Skip to content

Work in progress, but intended to sync Habitica with Todoist. We haven't decided on a good name for the project, so we are going with Project Hype-Berry for the moment.

Notifications You must be signed in to change notification settings

programmerPhysicist/Project_Hype-Berry

 
 

Repository files navigation

Project Hype-Berry

⚠️ Alpha script!

⚠️ Only one way syncing is working right now.

This is intended to be a two-way sync of Habitica and Todoist. Any tasks that can't be found in both services should appear on the others, with the same status. If you complete a task on one service, it should appear as completed on another. Tasks that are created on Habitica should be sent to the 'Inbox' project on Todoist.

AS A NOTE: in order to have two way syncing, you MUST have a paid copy of Todoist. It's not possible to sync complete tasks from Todoist otherwise. If you do not have a paid copy of Todoist, the following will happen:

  1. Completed tasks will not sync between the services.
  2. Tasks that you begin and complete from one service to the other will not transfer between the two.

That means that if you create a task in Todoist and then check it off, right now it will not send the points to Habitica.

INSTALLATION

Linux Installation

  1. Install the python dependencies:
pip install todoist_api_python requests scriptabit tzlocal iso8601 python-dateutil
  1. Get the source code here
  2. You need to add your API tokens to the Project_Hype-Berry/source/auth.cfg.example file
  3. Rename the file to Project_Hype-Berry/source/auth.cfg (remove the '.example' at the end).
  4. Add the folder oneWaySync to $XDG_STATE_HOME: mkdir $XDG_STATE_HOME/oneWaySync
  5. Add the oneWaySync.sh script to Crontab

TASK DIFFICULTY

I originally felt that it would be good if task difficulty translated between tasks created on Todoist and Habitica. Therefore, task difficulty should sync with the following code by default, as laid out in main.py

Todoist priority Habitica difficulty
p1 Hard
p2 Medium
p3 Easy
p4 Easy

If you'd like to change how the sync interprets difficulty or priority, please edit main.py. For example, my personal setup actually includes translating Todoist p4 to Easy, rather than Trivial, because I find that Trivial yields so few rewards they aren't worth it to me.

USAGE

Try running python one_way_sync.py in your terminal. (You have to run the command from the same directory that auth.cfg exists in).

Or you can try the provided shell script oneWaySync.sh under Project_Hype-Berry/scripts/

Credit

This program is a hard fork of Habitica-Todo, with some fixes added. Habitica-Todo has been abandoned by its original author.

Tests

To run tests, you will need to run the following pip command to install additional dependencies:

pip install pytest vcrpy mockito

About

Work in progress, but intended to sync Habitica with Todoist. We haven't decided on a good name for the project, so we are going with Project Hype-Berry for the moment.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.5%
  • Shell 0.5%