Giter Site home page Giter Site logo

mastodon-blocker's Introduction

Mastodon Blocker

This tool allows you to mass-block people on Mastodon. This is an emergency tool when you're being harassed by a mob. It helps to block people faster. Ideally, they are blocked before they even harass you. And yes, innocent people will get caught up in this. But when you're being harassed by a mob, maybe that's the kind of trade-off you're willing to make.

My hope is that something like this eventually makes it into all the Mastodon clients, and into the Mastodon web UI and the Mastodon client API (in order to make it easy to use). For more discussion, see issue #8680, "Chain Blocking."

Table of Contents

Installation

Here's how it works. You need Python 3 and you need the Mastodon.py library installed.

pip3 install Mastodon.py

Copy the script and make it executable:

curl https://alexschroeder.ch/cgit/mastodon-blocker/plain/mastodon-blocker > mastodon-blocker
chmod +x mastodon-blocker

(Please help me improve this process?)

Using it

Start the tool with your account:

./mastodon-blocker [email protected]

If you haven't authorized it, now's the time to do it. It prints a URL which you need to visit, authorize the app, copy the authorization code and paste it.

Registering app...
This app needs access to your Mastodon account.
Visit the following URL and authorize the app:
[it prints a long URL]
Then paste the access token here:
[you paste a long code]
Verifying the code...
Logging in...
Load the current blocks...
64 people already blocked

Now you're ready! This is the prompt:

Toot>

Copy and paste a URL to a toot. You get this URL right-click on the timestamp of a toot. In the Mastodon web user-interface, that's either the time elapsed in the top-right corner or the date in the bottom-left corner:

time elapsed

date

Or you can also take the URL of your browser if you've clicked on the toot. It's all good. All we care about is the number, the id. Either of these two formats will do:

https://octodon.social/@kensanata/100719339320366538
https://octodon.social/web/statuses/100719339320366538

Here's an example:

Toot> https://octodon.social/@kensanata/100719476477868576
Processing 100719476477868576
1 people favourited this toot
0 people boosted this toot
Blocking [email protected]

And what happens if you do it again? Nothing!

Toot> https://octodon.social/@kensanata/100719476477868576
Processing 100719476477868576
1 people favourited this toot
0 people boosted this toot
[email protected] is already blocked

Keep repeating this for every toot you see.

That's it! Stay safe. May you never be harassed by the mob.

Alternatives

There's a web app that does a similar thing:

mastodon-blocker's People

Contributors

kensanata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

archivecrew

mastodon-blocker's Issues

Question / Feature Request: Output of likes/favorites and/or followers of the account

Would it be possible to just output the likes / boosts of a specific post and/or followers of a specific account, so in case of dogpiling one could just add the post [i.e. social.example/annoyinguser/12345678901234567890] or in the case of a harrassment campaign just choose to block all their followers [ i.e. social.example/annoyinguser ] as an option?

This output comes in handy if one is syncronizing multiple accounts via a git repo and wants to automate & update said list as need be.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.