A pure Python (3.6+) script for doing sysopy/stewy things from your computer via the API. Requires an OAuth consumer be entered into a local file (see magik.conf) and saved in a specifc place. Use on your own responsibility, I'm not at fault for stupid mistakes. Please use the --help
switch... or even better, read the code.
- Clone the repo to a location of your choosing
- Add your OAuth consumer to magik.conf, rename the file and move to the location specified in the file's directions at the top.
- Execute the script and call
--help
switch- For unix-y systems
python3 /path/to/stew-magik.py --help
- For Windohs systems
python C:\path\to\stew-magik.py --help
- For unix-y systems
- If you're using a unix-y system, create a soft link into your
/usr/local/bin
directory like this:
sudo ln -s /path/to/stew-magik.py /usr/local/bin/magik
After that's done, you can skip the tediousness and just use it as a command:
magik block --target Someone --target Someone else --project somewiki --duration forever --reason I'm an asshole
- Enclose special characters in double quotes (
"
) - Get into the good habit of enclosing strings with double quotes as well.
magik block --target account1 --target account2 --project somewiki --duration 3months --reason Long term abuse
magik block --target Someone --project somewiki --duration forever --force --revoketpa --reason Abusing talk page
magik unblock --target account1 --target account2 --project somewiki --reason Wooppsiieee
magik lock --target Snuffy --reason lta
magik loc --target Snuffy --reason lta --hide
magik lock --target Snuffy --reason "LTA on rampage" --suppress
magik unlock --target Snuffy --reason Not an lta
magik gblock --target ip.add.res.1 --target ip.add.res.2 --duration 10mins --anononly --dryrun --reason I'm testing
magik ungblock --target ip.add.res.1 --target ip.add.res.2 --duration 10mins --reason I'm done testing