mstdn-boost
A simple bot built on Mastodon.py, boosting posts from a curated list.
Installation
- Set up a Python venv:
python3 -m venv ~/.venv/mstdn_boost - Install
Mastodon.pyin the venv:
~/.venv/mstdn_boost/bin/pip3 install Mastodon.py - Check out the repo:
git clone https://src.opensuse.org/fl4nn/mstdn-boost.git
cd mstdn-boost - Copy the Python script into the venv:
cp mstdn_boost.py ~/.venv/mstdn_boost/ - Copy the SystemD files into your users config directory and modify the
paths and environment settings to match your local setup:
mkdir -p ~/.config/systemd/user
cp systemd/* ~/.config/systemd/user/
vim ~/.config/systemd/user/boost* - Enable the SystemD service:
systemctl --user enable --now boost@EXAMPLE.timer - Rename the environment file to match your instance name (the bit after the @):
mv ~/.config/systemd/user/boost_.env ~/.config/systemd/user/boost_EXAMPLE.env
How it works
The script will read the first line from a text file (EXAMPLE.txt in case of
the above example), check if the line is a URL, the URL resolves to a fediverse
post and deletes the line. If a post was found matching the URL it is boosted.
It is possible to boost multiple posts at once by giving a line with a comma separated list of URLs.
Languages
Python
100%