A bot that tracks and auto-deletes statuses on Mastodon/Pleroma accounts after a set time if they are cringe enough
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Thor 31135bcccb Missing import for traceback module 3 years ago
fedbot@ac336e9492 Use fedbot module instead of bot.py copy 3 years ago
.gitignore Add data store for statuses; rearrange client files 3 years ago
.gitmodules Use fedbot module instead of bot.py copy 3 years ago
LICENSE Added MIT licence 3 years ago
README.md Make OCR support optional; other OCR patches 3 years ago
bogofilter.py Make OCR tokenise by non-whitespace instead of word characters 3 years ago
config.example.toml Defaults for all config options 3 years ago
cringebot.py Missing import for traceback module 3 years ago
cringebot.service Updated config files to reflect new name 3 years ago

README.md

cringebot

cringebot is a bot that tracks and auto-deletes statuses on Mastodon/Pleroma accounts after a set time if they are cringe enough. Multiple accounts across multiple instances are supported.

Installation (Ubuntu Linux)

Download cringebot and make user account

useradd -d /usr/local/lib/cringebot -M -s /bin/bash -U cringebot
sudo -i -u cringebot
git clone https://git.thj.no/thor/cringebot.git

Install dependencies

apt install python3 bogofilter
sudo -i -u cringebot
pip3 install Mastodon.py html2text

Install dependencies (OCR support)

apt install python3 bogofilter tesseract-ocr
sudo -i -u cringebot
pip3 install Mastodon.py html2text PIL

Create configuration

sudo -i -u cringebot
cp config.example.toml config.toml
editor config.toml

Run from command line

sudo -i -u cringebot
python3 cringebot.py

Install systemd service

ln -s /usr/local/lib/cringebot/cringebot.service /etc/systemd/system/cringebot.service
systemctl enable cringebot
systemctl start cringebot

Management

# Restart service
systemctl restart cringebot

# Check service status
systemctl status cringebot

# Monitor log output
journalctl -t cringebot -f

Learning

The bot will respond to each of your statuses with a categorisation status. Reply with cringe and based to teach the bot a categorisation, and unlearn to undo it. When the bot categorises or is taught that a message is cringe, it's scheduled for deletion max_age minutes after it was posted. When it's learned as based, or unlearned, it's removed from the deletion schedule. Some learning parameters can be tuned by changing the constants in bogofilter.py. These will eventually be tunable in config.toml.

Maintainer

The maintainer can be contacted at @thor@pl.thj.no.