A CLI tool for checking the progress of the badge you are tracking on your Stack Overflow profile.
MIT License
A CLI tool for checking the progress of the badge you are tracking on your Stack Overflow profile.
npm install --global stack-fanatic-cli
$ stack-fanatic --help
Usage
$ stack-fanatic
[--debug]
[--plain]
[[email protected]]
[--login-password=password1345]
[--site=https://stackoverflow.com]
[--user-data-dir=/tmp/stack-fanatic]
Options
--debug Output debugging info in the console
--login-email The email address asssociated with the Stack Overflow account that you would like to log in to
--login-password The password for the StackOverflow account that you would like to log in to
--plain Only display the badge status text, no fancy box
--site The URL for the Stack Exchange site that you would like to pull badge info from
Should include the protocol at the beginning and no trailing slash (Defaults to "https://stackoverflow.com")
--user-data-dir Directory to save session data and cache to (Defaults to ""./userData")
Examples
$ stack-fanatic
$ stack-fanatic --site=https://gamedev.stackexchange.com
$ stack-fanatic [email protected] --login-password=password1234
Note: When you first run stack-fanatic, you will be prompted for a login email and password if you do not supply one using the options.
┌─────────────────────────────────┐
│ │
│ Fanatic (Gold) - 2/100 (2%) │
│ │
└─────────────────────────────────┘
--plain
optionFanatic (Gold) - 2/100 (2%)
DISCLAIMER: I take no responsibility for any consequences that happen as a result of using this tool in the following way:
Install this tool on a server and set up a cron job to run it on a daily basis to get the Enthusiast and Fanatic badges:
Run npm install --global stack-fanatic-cli
(If installing on Ubuntu Trusty, you'll need the libnss3
package)
Run stack-fanatic
(It'll ask you to log in initially, after that your session data will be saved)
Find out where your node and stack-fanatic executables are located by running which node
and which stack-fanatic
Run crontab -e
and add something like the following: (of course replacing the email address and executable paths with your own)
This will check my badge progress every day at noon and email me the results:
[email protected]
0 12 * * * TERM=dumb /srv/users/serverpilot/.nvm/versions/node/v8.16.0/bin/node /srv/users/serverpilot/.nvm/versions/node/v8.16.0/bin/stack-fanatic --plain
TERM=dumb
is required at the begining of the command to get rid of any errors resulting from the process not running in a real terminal and --plain
is required at the end of the command so that you don't end up with a bunch of invalid characters in your email as a result of the fancy box that is printed in the terminal.
Read more about crontab here.
MIT. See the LICENSE file for more info.