This is a sample implementation of an RSS bot that forwards messages to Taggr.
If you want to run your own bot on any RSS feed, follow the steps below.
Install the latest dfx tool following the official intructions.
Install the latest cargo tool following the official instructions.
Checkout the rssbot code:
git clone git@github.com:TaggrNetwork/rssbot.git
Open the file src/rssbot/src/rss.rs and change variables
REALMto the realm name for bot's messages,RSS_FEEDto the host name of your RSS feed.
If necessary, change the XML parsing inside the function parse_items and use the test_parsing unit test to test your changes.
Deploy the canister to the Internet Computer and enable canister logs:
make deploy
make enable_canister_logs
You should see a message like this:
Installing code for canister rssbot, with canister ID iqq3j-byaaa-aaaak-qug4a-cai
Copy the canister ID displayed in this message.
- Create a new user on Taggr.
- Open the settings page.
- Locate the field
Controller principaland enter into this field the cansiter ID copied from the previous step.
Now, the bot will fetch the RSS feed, prse the items and schedule them as messages.
The bot will post one message scheduled message to Taggr every half an hour.
If you want to change the posting frequency, change the variable POSTING_INTERVAL_MINS in the file src/rssbot/src/lib.rs.
To check the internal state of the bot, run make stats.
To check the logs of the bot, run make logs.