{"id":17726866,"url":"https://github.com/piterden/syntax-highlighter-bot","last_synced_at":"2025-07-12T07:02:40.177Z","repository":{"id":40725341,"uuid":"112262415","full_name":"Piterden/syntax-highlighter-bot","owner":"Piterden","description":"Syntax highlighter bot for telegram.","archived":false,"fork":false,"pushed_at":"2023-03-04T08:28:42.000Z","size":871,"stargazers_count":69,"open_issues_count":8,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T22:44:58.093Z","etag":null,"topics":["bot","nodejs","syntax-highlighting","telegraf","telegram"],"latest_commit_sha":null,"homepage":"https://t.me/cris_highlight_bot","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Piterden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T23:50:43.000Z","updated_at":"2025-06-02T05:28:55.000Z","dependencies_parsed_at":"2024-06-19T02:58:41.701Z","dependency_job_id":null,"html_url":"https://github.com/Piterden/syntax-highlighter-bot","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/Piterden/syntax-highlighter-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piterden%2Fsyntax-highlighter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piterden%2Fsyntax-highlighter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piterden%2Fsyntax-highlighter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piterden%2Fsyntax-highlighter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Piterden","download_url":"https://codeload.github.com/Piterden/syntax-highlighter-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piterden%2Fsyntax-highlighter-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951976,"owners_count":23687993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","nodejs","syntax-highlighting","telegraf","telegram"],"created_at":"2024-10-25T17:07:04.941Z","updated_at":"2025-07-12T07:02:40.159Z","avatar_url":"https://github.com/Piterden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syntax Highlighter Bot\n\n![Travis (.org)](https://img.shields.io/travis/com/Piterden/syntax-highlighter-bot.svg?style=for-the-badge) ![GitHub search hit counter](https://img.shields.io/github/search/Piterden/syntax-highlighter-bot/highlight.svg?style=for-the-badge) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Piterden/syntax-highlighter-bot.svg?style=for-the-badge)\n\nThe bot for creating an image with highlighted code from a message.\n\n## Overview\n\nThis bot was written on top of the [Telegraf.js](https://github.com/telegraf/telegraf) bot framework, so all you need to have is the Node.js \u003e v6.\n\n## Usage\n\n[Demo](https://t.me/cris_highlight_bot) (WIP version).\n\nThe bot listens for entities type of `pre` in any text message. It means, it will render all pieces of text, wrapped in triple backticks (multiline code). Also you could force the language, writing its name on the first line, right after backticks. Just like on the GitHub.\n\nLook at the example of a code should be handled by the bot:\n\n```\n\\`\\`\\`js\n/**\n * Show themes list\n */\nbot.command('theme', (ctx) =\u003e isPrivateChat(ctx)\n  ? ctx.replyWithMarkdown(\n    messages.themeChoose(ctx.state.user.theme),\n    Markup.keyboard(themesKeyboard(themes)).oneTime().resize().extra()\n  )\n  : ctx.reply(messages.themeGroup)\n)\\`\\`\\`\n```\n\n### Commands\n\n- `/start` - Initial launch of the bot.\n- `/theme` - Shows the list of included themes and allows you to select a theme which you like more.\n- `/langs` - Shows the list of supported languages.\n\n## Installing\n\nFirst of all clone this repository and install dependencies. Run in the terminal:\n\n```bash\n$ git clone git@github.com:Piterden/syntax-highlighter-bot.git\n$ cd syntax-highlighter-bot\n$ npm i\n```\n\nThen you need to create and fill the new `.env` file:\n\n```bash\n$ cp .env.example .env\n$ editor .env\n```\n\n## Built With\n\n* [Telegraf.js](https://github.com/telegraf/telegraf) - The bot framework.\n* [Objection.js](http://vincit.github.io/objection.js/) - ORM.\n* [Express.js](https://expressjs.com/) - HTTP server.\n* [Knex.js](http://knexjs.org/) - Query builder.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\n* **Cristian Ospina** - *Bot's [initial version](https://github.com/Piterden/syntax-highlighter-bot/tree/old-double-bot)* - [CristianOspina](https://github.com/CristianOspina)\n* **Denis Efremov** - *Rewrite to the Node.js* - [Piterden](https://github.com/Piterden)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Donate\n\n- **BTC** `3F275vPSCvYW19MHZqSjw79fEwwU4MbTgV`\n- **LTC** `MGMCQB3QAcrSBjU3eGJviqB2J2f5BNVRGr`\n- **DOGE** `D5m69FRDGEn3G3xuakvqTxUpGVt6NegKJp`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiterden%2Fsyntax-highlighter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiterden%2Fsyntax-highlighter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiterden%2Fsyntax-highlighter-bot/lists"}