RSS feeds to Mastodon API
.idea | ||
.gitignore | ||
LICENSE | ||
login.py | ||
main.py | ||
README.md | ||
requirements.txt |
fedifeeds
RSS feeds to Mastodon API. Supports multiple feeds per account, Markdown, and automatic threading (split into multiple notes to fit character limit).
Setup
Make sure you have:
- Python 3.10+
- python-virtualenv
- pip3
Clone and install dependencies
git clone https://codeberg.org/pancakes/fedifeeds.git
cd fedifeeds
python3 -m virtualenv .venv
.venv/bin/pip3 install -r requirements.txt
Login
Use the login script
.venv/bin/python3 login.py
Configuration
Create a JSON file with
- Keys being the URL to the RSS feed
- Values being the unix timestamp that is used as the minimum entry date
Example:
{
"https://example.org/feed1.rss": 0,
"https://example.org/feed2.rss": 0
}
Running
When running it will ignore every entry older than the configured timestamp and post the rest to the selected account. After running the feed config is automatically updated with the timestamp of the latest entry to avoid duplication.
.venv/bin/python3 main.py <username> <config>
Cron example (every 30 minutes):
*/30 * * * * (cd <fedifeeds-path>; .venv/bin/python3 main.py <username> <config>