Skip to content

MLTSHP/best-of-mltshp-bot

Repository files navigation

Best of MLTSHP Mastodon bot

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.

Development Setup

python -m venv env
source env/bin/activate
pip install -r requirements.txt

Edit .env with environment variables described below.

Environment variables

  • 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]

Run from the CLI

$ python best_of_mltshp.py

GitHub Actions

This repo includes a workflow to run the bot:

  • Each time an update gets pushed
  • On demand from the Actions tab
  • Every five minutes

Inspiration

Prompted by this post (and GitHub issue) from Jessamyn West. This post from Ben Tasker's blog was a helpful reference.

About

Posts new feed items to Mastodon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages