Monitor RSS Feeds and send a Slack message with a link to ones that contain predefined keywords. Uses a sqlite3 database to track articles that have already been sent.
- Python3.8
- libraries in Pipfile
- Create SlackBot via instructions in Step 1 here. Copy the OAuth Access Token.
- Copy the
sample.env
file to a.env
file and update theSLACK_TOKEN
andCHANNEL
variables - Add tab-delimited Titles and Feed RSS URLs to your
feeds.txt
file and keywords to yourkeywords.txt
file.
python3 parseFeeds.py
Optionally, you can set up a crontab to run this every day at a specified time. The feeds and keywords files can also be passed on the command-line, overriding the environment variables like so:
python3 parseFeeds.py --feeds <feeds_file> --keywords <keywords_file>
Thanks to tutorials:
- https://www.digitalocean.com/community/tutorials/how-to-build-a-slackbot-in-python-on-ubuntu-20-04
- https://fedoramagazine.org/never-miss-magazines-article-build-rss-notification-system
If you run into a problem with the code, feel free to raise an issue or submit a PR.
- More refined keyword parsing
- Retrieve and scan article text
- Ranking of articles based on keyword hits
- Condensed option for messages
- Tag people when specific keywords seen