This project is intended to make it easy to track various metrics for todoist, including things like:
- how many tasks are currently OVERDUE (including today)
- how much time is allocated to currently OVERDUE (including today) tasks
- the priority level of currently OVERDUE (including today) tasks
todoist-tracker
is a hack to make it easy to quickly gauge how "underwater"
you are and how productive you've been. It is intended to be set up as a
cronjob with a crontab entry like:
45 21 * * * todoist-tracker overdue n
45 21 * * * todoist-tracker overdue time
45 21 * * * todoist-tracker overdue priority
which runs todoist-tracker
every night at 9:45 p.m. By default, the resulting
metrics are stored in a google spreadsheet for subsequent analysis. Depending
on the version of requests
that is installed via python dependencies, you may
also want to use PYTHONWARNINGS=ignore
somewhere in your crontab to avoid
being sent warnings every time the script is run.
-
install
todoist-tracker
from pypi:pip install todoist-tracker
-
get your todoist api token from the todoist
Settings
>Account
>API token
. -
place your todoist api token in a
todoist.json
file in the repository root that looks like this:{ "token": "your-token" }
-
get your google spreadsheet credentials by following the gspread instructions.
-
place your google spreadsheet credentials in a
google.json
file in the repository root and add yourworkbook_url
to the JSON:{ ... "workbook_url": "https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit#gid=0" }
-
💥 For usage instructions, see
todoist-tracker -h
-
instantiate virtual environment
mkvirtualenv todoist-tracker pip install -r requirements/python-dev
-
add the
bin/
directory to your virtualenvPATH
and the project root to yourPYTHONPATH
with# setup paths on virtualenv activation echo 'export __PATH_TODOIST_TRACKER=$PATH' > ~/.virtualenvs/todoist-tracker/bin/postactivate echo 'export PATH=$PATH:'`pwd`'/bin' >> ~/.virtualenvs/todoist-tracker/bin/postactivate echo 'export PYTHONPATH=$PYTHONPATH:'`pwd` >> ~/.virtualenvs/todoist-tracker/bin/postactivate # setup paths on virtualenv deactivation echo 'unset PYTHONPATH' > ~/.virtualenvs/todoist-tracker/bin/predeactivate echo 'export PATH=$__PATH_TODOIST_TRACKER' > ~/.virtualenvs/todoist-tracker/bin/predeactivate
-
follow the quick start instructions above to get your todoist credentials.