Todoistsorter sorts (and capitalizes first letter) of tasks on a given Todoist task-list into sub-sections, based on where tasks with the same name were last found.
This is a near-complete rewrite of frostbox42/todoistsorter to use new Todoist APIs.
Todoistsorter has two methods of action:
- Receives incoming webhook from Todoist with a single item
- For added items: capitalized first letter (if not already done)
- For added items: check if exists in database of previously known items 4a. If item is previously known it is moved to the last known section 4b. If item is not known, item is left where it is
- For updated or completed items: stores which section they were in
I've encountered situations where the Todoist webhooks simply don't come in, or they're very late. Therefore, todoistsorter can reconcile the full project on a recurring basis.
- Every
SYNC_INTERVALseconds, pull all active (not completed) tasks from your project - Capitalize the first letter (if not already done)
- If the item is in a section, store that section in the database
- If the item is not in a section, move it to the last known section
- Todoist account (can be create here: https://todoist.com/users/showregister)
- Todoist app (can be created here: https://developer.todoist.com/appconsole.html)
-
- Setup "Webhooks callback URL" (url to reach the container)
-
- Setup "Watched Events" (item:added, item:updated, item:completed)
- Container needs to be reachable from the internet (uses webhooks)
- API-token (can be found here: https://todoist.com/prefs/integrations, will look something like be50z1p7zuisib8uj5unbe50z1p7zuisib8uj5un
- Project (go to project using web-browser and see URL, will look something like this: 2F0123456789)
APITOKEN(required) - Private API-token, can be retrieved from the "Integration" part of the settings in the Todoist web-interface (see above)PROJECT(required) - ID of the project the project to monitor, can be retrieved from the url of the project when accessed through web-browser (see above section)SYNC_INTERVAL(optional) - How often to run a full reconcileLOGGING(optional, default INFO) - What level of logging to use (CRITICAL, ERROR, WARNING, INFO, DEBUG)
services:
todoistsorter:
image: ghcr.io/trevorswanson/todoistsorter:latest
container_name: todoistsorter
volumes:
./data:/app/data
environment:
- APITOKEN=**INSERT API-TOKEN HERE**
- PROJECT=**INSERT PROJECT-ID HERE**
ports:
- 5005:5005
restart: unless-stoppeddocker run -p 5005:5005 --restart unless-stopped -e APITOKEN=**INSERT API-TOKEN HERE** -e PROJECT=**INSERT PROJECT-ID HERE** tswanson/todoistsorter- Python v 3.13
- Alpine Linux
- Todoist API v1
- SQLite3
- Casper Frost - CasperFrost
- Trevor Swanson - trevorswanson