This is a small utility to help you keep your Todoist tasks in sync with HabitRPG.
Ensure that you have NodeJS installed.
Then run:
npm install -g todoist-habitrpg
Currently the Windows NodeJS installer has a bug in it. If you encounter an Error: ENOENT, stat 'C:\Users\.....'
error, just create a folder at the path specified and re-run the above command.
From the terminal or command prompt enter the command below and replace habitRpgUserId
, habitRpgApiToken
, and todoistApiToken
with the correct values. You can find directions on how to find these values in the Locating Your API Tokens section.
todoist-habitrpg -u habitRpgUserId -t habitRpgApiToken -a todoistApiToken
Your User ID (habitRpgUserId
) and API Token (habitRpgApiToken
) can be located at your HabitRPG settings page.
Your API Token (todoistApiToken) can be located by following these steps:
Pass a -f flag followed by the directory where you want your file to be stored, relative to your home directory. For example, if you want the json file stored in ~/foo/bar/.todoist-habitrpg.json, you'd write the following at the end of your terminal command
-f ~/foo/bar
Once you've reached level 10 in HabitRPG, you start gaining skill points and can choose to allocate those skill points based on the kind of task you do. You can choose what kind of task it is by applying labels in Todoist. Below is a list of valid labels for each attribute.
Attribute Name | Valid Labels |
---|---|
Strength | str, strength, physical, phy |
Intelligence | int, intelligence, mental, men |
Constitution | con, constitution, social, soc |
Perception | per, perception, other, oth |
If more than one valid label is assigned to a task in todoist, the first valid label will be assigned to the task in HabitRPG.
Periodically new versions will be published. You can install these updates with the command below.
npm update -g todoist-habitrpg
todoist-habitrpg --help
I would recommend setting this up as a cron job for automatic syncing.
crontab -e
HOME=/home/username
*/10 * * * * todoist-habitrpg -u habitRpgUserId -t habitRpgApiToken -a todoistApiToken
crontab -l
Troubleshooting: If this doesn't work for you, please use absolute paths or adjust the PATH for your cron.
$HOME/.todoist-habitrpg.json