Takes an RSS feed and posts to a configured bot account. The bot checks the MLTSHP feed and compares it to a feed of its own already-posted toots and if it finds one that's missing, the bot toots it out. Each time a new link is processed, it gets added to links.log
and committed to the repo.
python -m venv env
source env/bin/activate
pip install -r requirements.txt
Edit .env
with environment variables described below.
MASTODON_INSTANCE
- hostname of the Mastodon instance e.g.,mastodon.social
MASTODON_USER
- the bot's user account, prefixed with an@
symbol, e.g.,@bot_user
MASTODON_TOKEN
- access token found in Mastodon Settings → Development → [Your Application]
$ python best_of_mltshp.py
This repo includes a workflow to run the bot:
- Each time an update gets pushed
- On demand from the Actions tab
- Every five minutes
Prompted by this post (and GitHub issue) from Jessamyn West. This post from Ben Tasker's blog was a helpful reference.