Skip to content

ussaka/todoist-prioritizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description of the image

todoist-prioritizer

wakatime Unit tests CodeQL

📑 Documentation

Automatic Todoist tasks prioritizer

Description

The todoist-prioritizer is a Python script designed to manage Todoist tasks priority levels. Users can determine the number of tasks they want at each priority level, ranging from P1 (highest priority) to P3 (lowest priority). This tool is best suited for users with large amount of tasks without due date.

How it works?

  • Specify the number of tasks desired for each priority level (P1 to P3)
  • When task count at specific priority level falls below the user's preferences, the script automatically promotes tasks from lower priority levels to higher ones, starting from the oldest task
    • E.g. If P1 level has 3/5 tasks then promote tasks from P2 to P1 starting from the oldest task in P2. After that, if P2 has less tasks than desired promote tasks from P3 to it and so on...
  • The script runs once a day at a time specified by the user

Usage

If the script is run without arguments, it will prompt for user input. This is true for just executing .exe too. Only Todoist api token needs to be set, the user can run other settings with default values. The api token is available at integrations/developer.

Available commands

todoist-prioritizer --help
usage: todoist-prioritizer.py [-h] [-a API_TOKEN] [-p1 P1_SIZE] [-p2 P2_SIZE] [-p3 P3_SIZE] [-hh RUN_HOUR]
                              [-mm RUN_MINUTE] [-r] [-d]

options:
  -h, --help                     show this help message and exit
  -a API_TOKEN, --api API_TOKEN  Set api token
  -p1 P1_SIZE                    Maximum number of P1 tasks
  -p2 P2_SIZE                    Maximum number of P2 tasks
  -p3 P3_SIZE                    Maximum number of P3 tasks
  -hh RUN_HOUR                   The hour to run the script, 24 hour format
  -mm RUN_MINUTE                 The minute to run the script, 24 hour format
  -r, --reset                    Reset configuration to default values
  -d, --debug                    Enable debug logging level

Example usage

  • Windows
    ./todoist-prioritizer.exe -a 3x4mpl34p1k3y -h 00 -m 00 -d
  • Python
    python todoist-prioritizer.py -a 3x4mpl34p1k3y -h 00 -m 00 -d

Default settings

Installation

Pre-compiled .exe binaries are released for Windows users.

Python

Install dependencies

pip install -r requirements.txt

PyInstaller

Users can compile the script by themselves to an executable using PyInstaller.

pyinstaller src/todoist_prioritizer.py --icon=docs/priority.ico -c --onefile --add-data src/config.ini:.

Security

This script relies on todoist-api-python and keyring libraries to manage Todoist API token. Precompiled binaries are available for Windows but you can compile them yourself or just run the script with Python to verify executed code.

API token

Todoist API token is stored using keyring library. The library chooses backend to use depending on the OS.

Todoist API Python Client

The script uses official todoist-api-python client for connection to Todoist API. Communication between the script and Todoist API is assumed to be secure.