small tool to suspend instances on Mastodon from the command line
- JavaScript 96.5%
- Shell 3.5%
|
jdm2
088deb8fba
feature/replace-mastodon-api ( #3 )
Co-authored-by: jdm2 <jdm2@boriken.social> Reviewed-on: #3 |
||
|---|---|---|
| .env.example | feature/replace-mastodon-api ( #3 ) | |
| .gitignore | ||
| AUTHORS.md | add authors.md | |
| fedibroquel.sh | add launcher | |
| index.js | feature/replace-mastodon-api ( #3 ) | |
| package-lock.json | feature/replace-mastodon-api ( #3 ) | |
| package.json | feature/replace-mastodon-api ( #3 ) | |
| README.md | feature/replace-mastodon-api ( #3 ) | |
fedibroquel
small tool to suspend instances on Mastodon from the command line
this tool leverages the Mastodon API and the masto.js library
Requirements
- Node JS and NPM
- Git
- Mastodon instance with privileges to suspend other fediverse instances
Setup
- Go to your Mastodon account with admin privileges and create a new application. Make sure it can do domain blocks.
- Install Node JS and NPM
- Clone this git repository
- Change directory to the repository
- Run
npm install - Copy .env.example into .env file
- Fill out the values on
.envfile. -
- ACCESSTOKEN: provided by Mastodon once you create application.
-
- TIMEOUT: timeout in milliseconds. Default value 60000.
-
- APIURL: URL of the Mastodon instance you moderate. Example: https://mastodon.social
Usage
node index.js --domain [domain] --private-reason [private reason] --public-reason [public reason] --obfuscate [true/false]
--domainparameter is required. string value, no spaces--private-reasonis required. string value, no spaces (for now)--public-reasonis optional. default value is the same private reason, no spaces (for now)--obfuscateis optional. default value is true.
Notes
- You can also use launcher fedibroquel.sh and add it as a symlink to your /usr/local/bin/ folder if you are on Linux
sudo ln -s $(pwd)/fedibroquel.sh /usr/local/bin/fedibroquelsudo ln -s $(pwd)/fedibroquel.sh /usr/bin/fedibroquel