A simple telegram bot for following rss feeds. In Rust.
- Have rustc and cargo installed. You can use rustup for this.
- Install
pkg-configandlibssl. Package names may differ in various distros. - Build the project with cargo:
git clone https://github.com/aerfanr/telegram-rss-rust.git
cd telegram-rss-rust
cargo build
You can also create an optimized release build by using:
cargo build --release
- Create the config file at
/opt/rss.yaml. You can copyrss.yamland change it. - Set
TELOXIDE_TOKENenvironment variable to your Telegram bot token. You can get a bot token from the BotFather (t.me/BotFather) - Set up a redis server
- Run the program
./target/release/telegram-rss-rust
or
./target/debug/telegram-rss-rust
There is an example config file at rss.yaml you can copy and modify it.
Here are all the config options:
An array of all rss feeds. Each feed is a yaml object with following options:
- id: An arbitrary name for the feed. This has no purpose at the moment.
- url: Feed url
- expire_delay: Number of seconds to wait before removing each item from the database. Negetive values mean the items are never deleted. Default is
604800(a weak) - chats: An array of numeric telegram chat ids to send the recieved feed items to
Number of seconds to wait after getting feed updates.
A string containing the database host. Default value is "localhost".
A number containing the database port. Defalt value is 6379.