RSS feeds to Mastodon API
Find a file
2024-11-25 18:04:41 +10:00
.idea Add RSS reading functionality 2024-10-15 18:56:14 +10:00
.gitignore Add account login function 2024-11-25 00:07:01 +10:00
LICENSE Add LICENSE and README.md 2024-11-25 01:21:50 +10:00
login.py Reapply "Limit scopes" 2024-11-25 18:00:40 +10:00
main.py Fix entry date parsing and don't include entry link twice 2024-11-25 18:04:41 +10:00
README.md Fix docs 2024-11-25 01:48:16 +10:00
requirements.txt Add RSS reading functionality 2024-10-15 18:56:14 +10:00

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>