An RSS/Atom bot for telegram channels
Make sure that you have installed Redis.
Download binary:
$ curl -L https://github.com/rossnomann/telefeed/releases/download/0.6.0/telefeed-0.6.0_x86_64-linux-gnu --output telefeed
$ chmod +x telefeedCreate config.toml:
token = "bottoken"
redis_url = "redis://127.0.0.1:6379"
# include_feed_title = true # include feed title to entry link; defaults to false
# request_timeout = 3600 # timeout between requests in seconds; defaults to 1200 (20 minutes)
[[feeds."@channel"]] # channel username with @
url = "http://www.darkside.ru/rss/" # url to feed
kind = "rss" # kind of feed: rss/atom
# request_timeout = 20 # override root value
[[feeds.1234567890]] # channel ID also supported
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCX5180-7TnjjHlHaVDdqnmA"
kind = "atom"
# include_feed_title = false # override root value
[[feeds.1234567890]]
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC2S1gZS9e8jb3Mx1Ce6YH5g"
kind = "atom"Run:
./telefeed config.tomlTo run the bot use cargo run -- data/config.toml or just run.
Don't forget to create the config.
Before commit: pre-commit install.
Or run manually: pre-commit run -a.
Make sure that you have enabled nix flakes and installed direnv.
echo 'use flake' > .envrc
direnv allowCommand for rust analyzer LSP config:
nix develop /path/to/project --command rust-analyzerTo start/stop redis use mprocs.
To build a release binary use just or just nixos-build.
Make sure that you have installed Redis if you need to run the bot.
To build a release binary use cargo build --release.
- Breaking: Changed configuration file format from YAML to TOML.
- Added nix dev shell.
- Updated base64 to 0.22.
- Updated bytes to 1.6.
- Updated env_logger to 0.11.
- Updated redis to 0.25.
- Updated reqwest to 0.12.
- Updated tgbot to 0.27.
- Updated tokio to 1.38.
- serde_yaml replaced by toml.
- Updated redis to 0.24.
- Updated tgbot to 0.20.
- Updated tokio to 1.35.
- Updated bytes to 1.5.
- dotenv replaced by dotenvy.
- Updated redis to 0.23.
- Updated tgbot to 0.19.
- Updated tokio to 1.34.
- Updated tgbot to 0.17 and tokio to 1.16.
- Migrated from darkredis to redis-rs.
- Removed proxy configuration parameter.
- Added information about url to request error message.
- Separate fetching of feed entries.
- Added
request_timeoutoption to root and feed config section. - Added
include_feed_titleoption to feed config section.
- Added
include_feed_titleoption to config. Set it totruewhen you need to know feed title for each entry.
- Escape special characters in URL title.
- Fixed entries duplication.
- RIIR.
- Catch exceptions in getUpdates loop
- Migrate to aiotg.
- Add http/socks5 proxy support.
- Exclude entry title from unique constraint.
- Escape html entities in entry title.
- Display dates with a timezone.
- Catch feedparser exceptions.
- First release.
The MIT License (MIT)