todoist-repeater

Create recurring tasks in Todoist with cron-style syntax
Log | Files | Refs | README

commit b488c1495f90605646453a4c6e3c3d69022bf135
Author: David Schlachter <t480-debian-git@schlachter.ca>
Date:   Mon, 10 Nov 2025 00:24:57 -0500

Propose design in README

Diffstat:
AREADME.md | 47+++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,46 @@ +# Todoist Repeater + +I use Todoist as my todo app. I add tasks to my Inbox, sorted descending by date added. However, repeating tasks in Todoist don't work with my workflow: they stay in a fixed position in the list, and just refresh the due date. + +What I want is a task that appears on a given interval, disappears when it's completed, and, when it's time to do it again, reappears at the top of the list. + +Some examples of tasks that I want to recurr in this way: + +- each weekday, do a given number of Pomodoros for work +- every day, practice my dance choreography for 15 minutes +- every Monday evening, take out the garbage, recycling, and compost +- every two weeks, wash my bedding +- every six months, wash and condition the leather sofa +- every three months, do a reflection on how I'm feeling about work + +The idea for this program is to: + +- have a list of tasks that specifies the task name and the recurrence (interval, start and end date) +- when it's time to add a task to Todoist, use the Todoist API to create the task in my inbox + +Here's the API documentation: https://developer.todoist.com/api/v1/ + +- I can probably get away with not implementing OAuth, and just using an access token +- Creating tasks: https://developer.todoist.com/api/v1/#tag/Tasks/operation/create_task_api_v1_tasks_post (simple because pretty much all I want is the task name) + +The hard part is how to specify the input file and recurrence mechanism. + +There are some interesting considerations: + +- if we somehow weren't running when we should have created a task, should we do so later? +- should we track when we created a task so we don't do it twice somehow? +- how can we handle reloading the input file? +- is DST dangerous? + +Seems like https://github.com/robfig/cron is the most popular scheduler, and it doesn't have any dependencies, which I like. + +So, here's what I have in mind: + +At program start, and every minute thereafter: + +- read the input file line by line +- if we've seen a line before, do nothing +- if we have not seen it, add the line to the hash of seen lines; then, add it to the scheduler +- if there were any lines that we did not see during this read of the file, but that we saw previously, remove them from the scheduler + +The lines will be formatted like a cron file, but instead of a command, we will simply have the name of the task to be created. +\ No newline at end of file