To get this working, you first need the appropriate Python libraries (can run sudo pip install -r requirements.txt
, sudo not needed if installing to a virtualenv)
Then you also need to generate a google token. You can follow the guide here. Use a native application.
Basically, you need to create a project, then generate client id and client secret, and put those in your homedir (whatever comes back when you run python -c 'import os; print os.path.expanduser("~")'
) in a file called hunttools.conf
(you can copy and modify the one in the repo):
[gdrive]
client_id = <client_id>
client_secret = <client_secret>
You should also enable the Google Drive (guide) and URL Shortener APIs (guide).
Then you can run ./gdrive_api.py
to grab and save the token you'll use for all your api requests. It will save your credentials to a file called gdrive_creds
in your home directory.
You also need to grab the slack token, probably from here. And add that to hunttools.conf
like this:
[slack]
token = <token>
Then you should be able to call
./prep_puzzle.py 'Build Your Own Sudoku' 'http://www.mit.edu/~puzzle/2014/puzzle/build_your_own_sudoku/'