# Masto Defederation tool by Clarjon1! # Public domain code, remix and do as ye will. Please be kind! from mastodon import Mastodon ###### ## VARIABLES EDITINGS ### Access Token mytoken = "TokenGoesHere" ### Instance URL myinstance = "https://yourlinkhere" ### Defed List File Name. myfilename = "defedlist.txt" ### Action to take. Current valid options: suspend, silence, limit myaction = "suspend" m = Mastodon(access_token=mytoken, api_base_url=myinstance) myfile = open(myfilename, "r") myline = myfile.readline() while myline: print(myline) m.admin_create_domain_block(domain=myline, severity=myaction) myline = myfile.readline() myfile.close()