A tool for blocking federation with Mastodon instances in bulk
- Python 100%
| .gitignore | ||
| blocklist.csv | ||
| fediblock_importer.py | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
| settings.ini.example | ||
UPDATE 2024-02-18: This tool is no longer necessary, you can import blocklists directly into Mastodon in newer versions. From your settings page, go to Moderation -> Federation -> Import. Export your existing blocklist first to get a sample of the format your blocklist should be imported in.
This is a tool for bulk blocking federation with Mastodon instances.
Setup
- Copy
settings.ini.exampletosettings.ini - Create a new Mastodon application in the settings under Development -> New Application
- Grant the application
admin:writepermission, and copy the access token tosettings.ini - Enter the URL for your Mastodon instance (excluding the
https://) insettings.ini
Blocklist formatting
Add rows to blocklist.csv for each domain you want to block in the following format:
domain,block_type,reject_media,reject_reports,private_comment,public_comment,obfuscate
block_type should be either silence or suspend
reject_media, reject_reports, and obfuscate should be True or False (case-insensitive)
Usage
- Install required dependencies (literally just
requests) python fediblock_importer.py