A small tool to deploy blocklist updates to a mastodon server using its API.
 
 
Go to file
Julian-Samuel Gebühr c1e4770b0e Restructure project to make a valid poetry project, add script 2023-01-12 08:00:36 +01:00
mastodon_blocklist_deploy Restructure project to make a valid poetry project, add script 2023-01-12 08:00:36 +01:00
.gitignore Remove personal files and readd 2023-01-09 13:25:35 +01:00
LICENSE Initial commit 2023-01-05 15:21:59 +01:00
README.md Formatting 2023-01-09 08:40:28 +01:00
blocklist.toml Change key names to comply with API names 2023-01-09 08:41:16 +01:00
poetry.lock Restructure project to make a valid poetry project, add script 2023-01-12 08:00:36 +01:00
pyproject.toml Restructure project to make a valid poetry project, add script 2023-01-12 08:00:36 +01:00

README.md

mastodon-blocklist-deploy

A small tool to deploy blocklist updates to a mastodon server using its API.

Concept

The idea is to maintain a blocklist in a simple structured file in this repository. All changes need to be deployed to the mastodon server, this is supposed to be automated with Drone CI.

In order to compare the list entries, we can read the whole blocklist using the get endpoint. At the same time we read the whole file in the repository, make a comparision and remove unblocked domains from the blocklist and add newly added.

Since we have several attributes for a domain blog, a simple .txt file might not be sufficient. We probably want to set the severity, reject_media, reject_reports and comments. This means we need a human readable, easily python-readable and structured file format. Since Python 3.11 got native support for toml and it supports Array of Tables, I'd prefer to use this.