View on GitHub


Test Coverage
# habitist ![habitist](
An automation to enable habit tracking in todoist. 

It integrates "Don't Break the Chain" method for habit building into [todoist]( Once it's setup, you can forget about it and it works seamlessly.  
<p align="center">
    <img src=""/>

## Usage

![Habitist Screenshot](

1. You add habits you want to form as task on todoist with schedule `every day`

2. Add `[day 0]` to the task

3. When you complete the task, the [day 0] will become [day 1]

4. If you fail to complete the task and it becomes overdue, the script will schedule it to today and reset [day X] to [day 0].

## Setup Instructions
1. You will need a GitHub account to setup this for your use. Please signup from [here]( if you don't have an account yet. 

2. Once logged in to GitHub, [fork]( this repo to your GitHub account.  

![Forking a repo](

3. Find the Todoist API key for your account from `Settings > Integrations` from [here](  

![Setting up todoist key](

4. Goto `` by replacing `amitness` with your GitHub username. Click the `New Secret` button and add the key you got from step 3 as shown below.
<p align="center">
    <img src=""/>

5. We want to trigger this once the day ends. So, you will need to find the time in UTC when it's 12 AM in your country.
> For example, Nepal is 5:45 hrs ahead of UTC. For 12:00 AM in Nepal, UTC time will be 6:15 pm i.e. 18:15.

You can use []( to do it. As seen in screenshot, you just need to type 00:00 in the local time and select the `24` hour button. Note the time you get in the UTC column (i.e. 18:15 in below example)
<p align="center">
    <img src=""/>

6. Now, you need to go to `./github/workflows/pythonapp.yml` file in the repo and edit the `cron` key under `schedule` to the time you got in previous step. Just modify the first 2 numbers. The first number would be minutes and the second number would be hours. If you got `18:15` as the time in previous step, it would be `15 18 * * *`
<p align="center">
    <img src=""/>

7. If everything is setup correctly, the streak on the tasks will automatically increase/decrease on the next day.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details