Follow

code for exporting Mastodon instance suspensions 

very quick and dirty script to turn an instance's public block list into a csv that can (sort-of) import

output="";
Array.from(document.getElementsByTagName("table")[1].getElementsByTagName("tr")).forEach((row) => {
console.log(row)
let domain = row.querySelector("span");
if (domain != undefined) {
let reason = row.querySelector("td:nth-child(2)").textContent.trim().replace(/"/g, "");
output += `${domain.textContent.trim()},suspend,false,false,"${reason}",false\n`;
}
})
console.log(output)

you can go to an instance's /about/more page and run it in the browser console

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.