Skip to content

Instantly share code, notes, and snippets.

@error9900
error9900 / swap_todoist_labels.py
Last active January 31, 2024 00:46
Change one Label to another Label on all tasks with the first Label...
"""
This will find all Tasks with a specific Label, remove that Label, and add another specified Label.
Make sure you add your API token to `data/token.txt`!
You'll need the Python SDK for this to work:
https://developer.todoist.com/rest/v2/#python-sdk
"""
import uuid
@error9900
error9900 / sort_todoist_labels.py
Created January 30, 2024 23:32
Sort Todoist Labels alphabetically
"""
Make sure you add your API token to `data/token.txt`!
"""
import sys
import uuid
import requests
@error9900
error9900 / get_completed_items.py
Created November 10, 2023 06:42
Get completed items from Todoist
"""
Put your token in data/token.txt.
Completed items are written to `output/completed_items.py` as a Python dictionary.
Reference: https://developer.todoist.com/sync/v9/#get-all-completed-items
"""
import requests