npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

todoist-habitrpg

v1.1.1

Published

One way sync from Todoist -> HabitRPG.

Downloads

26

Readme

Todist - HabitRPG sync

Build Status

This is a small utility to help you keep your Todoist tasks in sync with HabitRPG.

Installation

Ensure that you have NodeJS installed.

Then run: npm install -g todoist-habitrpg

Windows Troubleshooting

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.

Running

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

Locating your API Tokens

HabitRPG

Your User ID (habitRpgUserId) and API Token (habitRpgApiToken) can be located at your HabitRPG settings page.

Todoist

Your API Token (todoistApiToken) can be located by following these steps:

  1. Login to your account at todoist.com
  2. Click the "Gear" icon in the top right corner
  3. Click "Todoist Settings"
  4. Click the "Account" header inside the modal.
  5. Your API Token is located on this page.

Choosing the directory where the sync history is stored

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

Assigning Attribute Labels

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.

Updating to new versions

Periodically new versions will be published. You can install these updates with the command below.

npm update -g todoist-habitrpg

Command Line Help

todoist-habitrpg --help

Cron Usage - Linux/Mac Only

I would recommend setting this up as a cron job for automatic syncing.

  1. crontab -e
  2. Set your $HOME variable: HOME=/home/username
  3. */10 * * * * todoist-habitrpg -u habitRpgUserId -t habitRpgApiToken -a todoistApiToken
  4. Verify it was saved with crontab -l

Troubleshooting: If this doesn't work for you, please use absolute paths or adjust the PATH for your cron.

Current Limitations

  • Only supports syncing from Todoist -> HabitRPG.
  • Only supports basic task syncing. Subtasks get synced as a toplevel task in HabitRPG
  • ~~Sync History file is hardcoded to be at $HOME/.todoist-habitrpg.json~~

Roadmap

  • ~~Support Windows~~
  • ~~Support specifying where the sync history file is.~~
  • If a task has a subtask, then create the item on HabitRPG as a checklist
  • If a task belongs to a project, on HabitRPG create a tag with that project name
  • If a task is a daily task then create it as a daily on HabitRPG
  • If a tasks is a repeating task then create it as a habit on HabitRPG
  • Support syncing from HabitRPG -> Todoist
  • Write up instructions on setting this up to run with the Windows Task Scheduler