{"id":13961525,"url":"https://github.com/ayrat555/el_monitorro","last_synced_at":"2025-04-12T23:38:55.938Z","repository":{"id":37755026,"uuid":"231756396","full_name":"ayrat555/el_monitorro","owner":"ayrat555","description":"🐂 El Monitorro is a high-performance feed reader as a Telegram bot. It supports RSS, Atom and JSON feeds","archived":false,"fork":false,"pushed_at":"2025-04-03T13:03:02.000Z","size":1640,"stargazers_count":207,"open_issues_count":11,"forks_count":40,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T23:38:48.280Z","etag":null,"topics":["data-feeds","rss-reader","rust","rust-lang","telegram-bot"],"latest_commit_sha":null,"homepage":"https://elmonitorro.badykov.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayrat555.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["ayrat555"],"custom":["https://paypal.me/AyratBadykov"]}},"created_at":"2020-01-04T12:05:44.000Z","updated_at":"2025-04-01T13:35:13.000Z","dependencies_parsed_at":"2023-09-24T16:55:02.584Z","dependency_job_id":"1d92fdf1-20ba-4c94-9faf-b10dc418fd59","html_url":"https://github.com/ayrat555/el_monitorro","commit_stats":{"total_commits":555,"total_committers":7,"mean_commits":79.28571428571429,"dds":"0.13873873873873876","last_synced_commit":"4c9ceb9283d51c968b732731763286fe06c1cc6b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fel_monitorro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fel_monitorro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fel_monitorro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fel_monitorro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayrat555","download_url":"https://codeload.github.com/ayrat555/el_monitorro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"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":["data-feeds","rss-reader","rust","rust-lang","telegram-bot"],"created_at":"2024-08-08T17:01:13.332Z","updated_at":"2025-04-12T23:38:55.917Z","avatar_url":"https://github.com/ayrat555.png","language":"Rust","readme":"+++\ntitle = \"El Monitorro\"\nsort_by = \"weight\"\n+++\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/AyratBadykov)\n\n# El Monitorro\n\nEl Monitorro is RSS, Atom and JSON feed reader as a Telegram bot.\n\nIt's available at [@el_monitorro_bot](https://t.me/el_monitorro_bot).\n\n# Usage\n\n### Commands\n\n```\n/start - show the bot's description and contact information\n\n/subscribe url - subscribe to feed\n\n/unsubscribe url - unsubscribe from feed\n\n/list_subscriptions - list your subscriptions\n\n/help - show available commands\n\n/set_timezone - set your timezone. All received dates will be converted to this timezone. It should be offset in minutes from UTC. For example, if you live in UTC +10 timezone, offset is equal to 600\n\n/get_timezone - get your timezone\n\n/set_template url template - set a template for all received items for the specified subscription. All new updates will be converted to the format defined by this subscription. Supported fields you can use for templates:\n- bot_feed_name - name of the feed\n- bot_feed_link - url of the feed\n- bot_item_name - name of the item\n- bot_item_link - url of the item\n- bot_item_description - description of the item\n- bot_date - publication date of the feed\n\nExample: /set_template https://www.badykov.com/feed.xml {{bot_feed_name}}\n\n\n    {{bot_item_name}}\n\n\n    {{bot_date}}\n\n\n    {{bot_item_link}}\n\nAlso, there are some helpers for templates:\n- `substring` helper that can be used to limit the number of characters. For example, {{substring bot_item_description 100}}\n- `create_link` helper. This helper creates an html link. For example, {{create_link bot_item_name bot_item_link}} or {{create_link \"custom_name\" bot_item_link}}\n- `italic` helper. Usage: {{italic bot_item_description}}\n- `bold` helper. Usage:  {{bold bot_item_name}}\n\n/get_template url - get a template for the subscription\n\n/remove_template url - remove the template\n\n/set_global_template - set global template. This template will be used for all subscriptions. If the subscription has its own template, the subscription template will be used. See /set_template for available fields.\n\n/remove_global_template - remove global template\n\n/get_global_template - get global template\n\n/get_filter url - get a filter for the subscription\n\n/set_filter url filter - set filter, for example, /set_filter https://www.badykov.com/feed.xml telegram,bots. You'll start receiving posts only containing words in the filter. Use `!word` to stop receiving messages containing the specified `word`. You can combine regular filter words with ! filter words. For example, `!bot,telegram`\n\n/remove_filter url - remove filter\n\n/set_global_filter filter - set global filter\n\n/get_global_filter - get a global filter\n\n/remove_global_filter - remove global filter\n\n/info - shows the number of subscriptions and chats. it's available only for the admin (`ADMIN_TELEGRAM_ID`)\n\n/set_content_fields url fields - changes content hash fields of the specified feed. it's available only for the admin (`ADMIN_TELEGRAM_ID`).\nExample: /set_content_fields https://www.badykov.com/feed.xml author,title\n\nBy default content hash is calculated from title and url.\n\nAvailable fields:\n    - link\n    - title\n    - publication_date\n    - guid\n    - description\n    - author\n\n/toggle_preview_enabled - disable or enable previews\n\n/get_preview_enabled - check if previews are enabled for the current chat. by default, previews are enabled\n```\n\n### Common info\n\n- Feed updates check interval is 1 minute.\n- Unread items delivery interval is 1 minute.\n- The number of subscriptions is limited to 5 for private chats, to 1 for groups and channels\n\nThe bot works in private chats, groups and channels. A couple of channels created with el monitorro:\n\n- https://t.me/emacs_posts - Emacs News and Posts\n- https://t.me/metacritic_tv - Latest Tv Show Metascores on Metacritic\n\n# Setup\n\n## Manual setup\n\nYou can deploy your instance of `el_monitorro` by:\n\n1. Set postgres db url (`DATABASE_URL`) and telegram bot token (`TELEGRAM_BOT_TOKEN`) to `.env` file in the root directory. For example:\n\n```\nDATABASE_URL=postgres://admin:pass@localhost/el_monitorro\nTELEGRAM_BOT_TOKEN=MYTOKEN\n```\n\n2. Setup database by running:\n\n```\ndiesel database setup\n```\n\nYou'll need diesel-cli for this\n\n3. Start the bot\n\n- Start the command bot\n\n```\nRUST_LOG=info RUST_BACKTRACE=1 cargo run --bin el_monitorro\n```\n- Start the sync binary\n\n```\nRUST_LOG=info RUST_BACKTRACE=1 cargo run --bin sync\n```\n\n- Start the delivery binary\n\n```\nRUST_LOG=info RUST_BACKTRACE=1 cargo run --bin deliver\n```\n\n- If you don't want to store all feed items that were synced and feeds without any subscriptions, start the cleaner binary\n\n```\nRUST_LOG=info RUST_BACKTRACE=1 cargo run --bin cleaner\n```\n\n### Running all services from a single binary\n\nSet `ALL_BINARIES` to run all binaries (clean, commands, deliver, sync) in the same binary:\n\n```\nALL_BINARIES=true\n```\n\n### Configuration\n\nAll configuration is done through env variables\n\n| Name                     | Required | Default value | Example / Description                                                                                                                                                               |\n|--------------------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| DATABASE_URL             | yes      | --            | postgres://postgres:postgres@localhost/el_monitorro                                                                                                                                 |\n| TELEGRAM_BOT_TOKEN       | yes      | --            | 6666618370:AAGx5YhNQvUG4eUcQXN-OB_a09ZzYl6aaaa                                                                                                                                      |\n| DATABASE_POOL_SIZE       | no       | 5             | The maximum number of connections for global connection pool (global per binary except if ALL_BINARIES is set to true).                                                             |\n| ALL_BINARIES             | no       | --            | If this var is set, all services will be started in the main binary                                                                                                                 |\n| TELEGRAM_BOT_HANDLE      | no       | --            | This value is used during parsing of commands. If you set autocompletion menu for your bot,  the bot will understand commands like `/subscribe@handle` along with just `/subscribe` |\n| SUBSCRIPTION_LIMIT       | no       | 20            |                                                                                                                                                                                     |\n| FILTER_LIMIT             | no       | 20            | The maximum number of filter words that can be set per subscription or as the global filter                                                                                         |\n| SYNC_INTERVAL_SECONDS    | no       | 60            | The bot tries to sync feeds every `SYNC_INTERVAL_SECONDS` seconds                                                                                                                   |\n| SYNC_WORKERS_NUMBER      | no       | 1             | The number of workers to sync feeds                                                                                                                                                 |\n| DELIVER_INTERVAL_SECONDS | no       | 60            | The bot tries to deliver new feed items every `DELIVER_INTERVAL_SECONDS` seconds                                                                                                    |\n| DELIVER_WORKERS_NUMBER   | no       | 1             | The number of workers to deliver updates                                                                                                                                            |\n| CLEAN_INTERVAL_SECONDS   | no       | 3600          | The bot cleans old feed items and feeds without subscriptions every `CLEAN_INTERVAL_SECONDS` seconds                                                                                |\n| CLEAN_WORKERS_NUMBER     | no       | 1             | The number of workers to remove old data                                                                                                                                            |\n| OWNER_TELEGRAM_ID        | no       | --            | If this value is set, the bot will process commands only from the specified user id                                                                                                 |\n| REQUEST_TIMEOUT          | no       | 5             | Timeout in seconds for feed syncing requests                                                                                                                                        |\n| ADMIN_TELEGRAM_ID        | no       | --            | If this value is set, `/info` command with stats is available for ADMIN_TELEGRAM_ID                                                                                                 |\n\n## Deployment suggestions\n\nIt's recommended to use a self hosted PostgreSQL instance but if it's not possible there are free services that can host it fo you:\n\n- https://supabase.com  500mb db, up to 60 connections\n- https://yugabyte.com, 10gb db, up to 10 connections\n- https://bit.io, 3gb\n\n## Using docker image\n\nThe image is published on docker hub under [ayratbadykov/el_monitorro](https://hub.docker.com/r/ayratbadykov/el_monitorro). It accepts additional env variables:\n\n- `SETUP_DB` - if this variable is not empty, `diesel database setup` is run. It creates DB and runs migrations.\n- `RUN_MIGRATION` - if this variable is not empty, `diesel migration run` is run. It just runs migrations.\n- `BOT_BINARY` - depending on this variable, docker container will run one of four binaries. Possible values are `commands`, `sync`, `deliver`, `cleaner`. To run all services in the main binary, set:\n\n```\nRUN_MIGRATION=true\nBOT_BINARY=commands\nALL_BINARIES=true\n```\n\nRun the docker container:\n\n```sh\ndocker run --env-file ./.env --network host -t ayratbadykov/el_monitorro:latest\n```\n\nNotes:\n\n- `--network host` is used so the docker container can access a host network if you're running Postgres on the same machine\n\nYou can check out an example of docker-compose file in the root directory of the project.\n\n#### Creating a docker image from the latest master branch\n\nRun the following command in the `el_monitorro` directory to build the image from the master branch:\n\n```sh\ndocker build ./ -t ayratbadykov/el_monitorro:latest\n```\n","funding_links":["https://github.com/sponsors/ayrat555","https://paypal.me/AyratBadykov"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayrat555%2Fel_monitorro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayrat555%2Fel_monitorro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayrat555%2Fel_monitorro/lists"}