Check RSS feed for new posts and send notifications
Project description
Pollboy
Simple script to poll an RSS feed and send notifications about new posts. Currently only supports Telegram Bot notifications.
This script is meant to be scheduled with cron to run at regular intervals.
Install
pip install pollboy
Config options
Below are sample options for the telegram and smtp notifiers.
This is using separate feeds, but you can also have both notifiers on a single feed.
disable_db: True
feeds:
- rss_url: "/path/to/feed1.xml"
notify:
telegram:
chat_id: "@YourChannel"
token: "your-token"
- rss_url: "/path/to/feed2.xml"
notify:
smtp:
recipient_db: "/path/to/subscribers.json"
from_email: "you@yourdomain.com"
from_name: "Your Name"
subject_prefix: "Daily Message - "
smtp_server: "smtp.your-server.com"
smtp_port: 465
smtp_username: "your-username"
smtp_password: "your-password"
unsubscribe_url: "http://your-domain.com?action=unsubscribe"
site_name: "Your Site"
site_url: "https://your-domain.com"
Run
pollboy
The first run will generate a config file at ~/.config/pollboy.config.yaml
. Update feeds and notification settings here.
Note - rss_url
can be either a local file path or remote URL.
By default, pollboy will store the timestamp from the last post it sent a notification for. If you want to disable this functionality for testing you can set a top-level variable in the config.yaml file:
disable_db: True
Publishing
Install twine
pip install twine
Install wheel (not always necessary)
pip install wheel
Build
python setup.py sdist bdist_wheel
Publish to pypi.org
twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pollboy-0.4.0.tar.gz
.
File metadata
- Download URL: pollboy-0.4.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0ee3249e30b17825f7ced12da8fc72feebaf3376907fda0e490eb3998fc89f4 |
|
MD5 | b66940d80ee99fb488133e64979be5ab |
|
BLAKE2b-256 | 2c22a1702c88e4b9925e255bfeecbc885085778c4c945c31c4adca839e0153a1 |
File details
Details for the file pollboy-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: pollboy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33fb546fbd8e35d060e455f3a44fcac32804542da1617c282142c4ae804a8c88 |
|
MD5 | a1bb82a743fb169442e9b2b857821360 |
|
BLAKE2b-256 | 181388aa0d05f11e3846154e39a846f611b4728ca50b8337a515929869a838b8 |