A todo file program inspired by when, the calendar
Find a file
2018-10-23 15:36:21 +00:00
app Load and save tasks 2018-09-30 17:35:57 +00:00
src/TaskMachine Fix cursor movement when deleting tasks 2018-10-23 15:36:21 +00:00
test Combine todo.txt related stuff, remove old stuff 2018-09-11 17:11:04 +00:00
.gitignore Add newline at end of .gitignore 2018-03-18 09:57:42 +00:00
ChangeLog.md Create stack project 2018-03-11 19:56:44 +00:00
exampletodo.txt Add todo and example todo 2018-09-18 21:02:27 +00:00
format.txt Use own task format 2018-09-17 21:48:03 +00:00
LICENSE Switch to MIT license 2018-09-28 21:42:46 +00:00
package.yaml Use liftIO instead of suspendAndResume 2018-09-29 10:59:36 +00:00
README.md Plan how the program should work and add docs 2018-09-08 21:53:40 +00:00
reformat.sh Add script to clean up files 2018-09-17 16:21:36 +00:00
Setup.hs Create stack project 2018-03-11 19:56:44 +00:00
stack.yaml Start work on todo.txt parser 2018-09-10 21:46:37 +00:00
todo.txt Change syntax highlighting 2018-10-23 15:31:24 +00:00

task-machine

A TUI client for the todo.txt format, written in Haskell, that supports automatically creating new tasks based on template tasks.

For an introduction to the file format, see the todo.txt readme.

Template tasks

Template tasks allow for automatically creating new tasks on certain dates.

They work by evaluating a formula for the current day. If the formula evaluates to true, a new task gets added to the current day using the template text specified. If it evaluates to false, nothing happens.

When creating a template task, a start date can be specified. In that case, the formula will be evaluated for every day from the starting date to the current date.

Once all tasks are added, the starting date will be set to one day after the current date automatically, to avoid evaluating any day twice, even if no starting date was specified initially.

Template tasks are inspired by Ben Crowell's when calendar program.

Format

This is the format for template tasks. The square brackets [] indicate an optional part of the syntax. The curly braces {} are part of the syntax.

# [start-date] {when-formula} [priority] template-text

  • The # signals that this line is a template task, not a normal task.

  • Optional: All days from start-date to the current date are tested when creating new tasks. It should be in the YYYY-MM-DD format. If no start-date is specified, it is assumed to be the current date.

  • The when-formula is evaluated in order to decide whether a new task should be created for a day.

  • Optional: The priority is a regular todo.txt priority, for example (E).

  • The template-text is pretty much a normal task description. The only difference is that it supports date expressions.

Examples

# 2018-09-08 {day_of_week == fri} clean the kitchen @home

# {d2018-10-20 - today >= 0} (A) daily every day up to (and including) 2018-10-20 with priority A

# {day == 20 && month == 10} Tom's birthday ({year - 1978} years old) (if Tom was born on 1978-10-20)

Date expression

TODO: Document properly once it's actually implemented

  • date + - numberdate
  • date - datenumber
  • number + - * / numbernumber
  • number == != > < >= <= numberboolean
  • boolean && || == != booleanboolean

When formula

Template text