A fork of https://github.com/jsahlen/todotxt with management of task dates.
Todotxt is a ruby CLI interface to work with a todo.txt file
Clone from avillafiorita/todotxt
git clone https://github.com/avillafiorita/todotxt
(Notice that the upstream version is also shipped as a gem, which makes installation a lot simpler. Go to jsahlen/todotxt for more details.)
Todotxt relies on a configuration file (
.todotxt.cfg) in your home directory,
which points to the location of your todo.txt. You can run
to generate this file, which will then point to
The repository contains a command
todotxt in the
The following commands are made available:
Tasks: todotxt add | a TEXT [--no_timestamp | -T] # Add a new Todo item todotxt append | app ITEM# STRING # Append STRING to ITEM# todotxt archive # Archive done items in todotxt del | rm ITEM#[, ITEM#, ITEM#, ...] # Remove ITEM# todotxt do ITEM#[, ITEM#, ITEM#, ...] # Mark ITEM# as done todotxt dp | depri ITEM#[, ITEM#, ITEM#, ...] # Remove priority for ITEM# todotxt generate_config # Create a .todotxt.cfg file in your home folder, containing import... todotxt generate_txt # Create a sample todo.txt todotxt help [TASK] # Describe available tasks or one specific task todotxt list | ls [SEARCH] # List all todos, or todos matching SEARCH todotxt listproj | lsproj # List all projects todotxt lscon | lsc # List all contexts todotxt lsdone | lsd # List all done items todotxt overdue | ovd # List overdue items todotxt prepend | prep ITEM# STRING # Prepend STRING to ITEM# todotxt pri | p ITEM# PRIORITY # Set priority of ITEM# to PRIORITY todotxt replace ITEM# TEXT # Completely replace ITEM# text with TEXT todotxt undo | u ITEM#[, ITEM#, ITEM#, ...] # Mark ITEM# item as not done todotxt upcoming | upc # List upcoming items todotxt version # Show todotxt version
todotxt will automatically run the
key:value convention of the
todo.txt format, we represent due dates, threshold dates, and recurring tasks as follows.
To set a due date for a task, add a
d: followed by the date in the
YYYY-MM-DD format. For instance:
2012-08-29 Do this important task by d:2012-12-25
To view upcoming and overdue tasks, use the
To set a threshold date for a task, add a
t: followed by the date in the
YYYY-MM-DD format. For instance:
2012-08-29 Do this important task no earlier than t:2012-12-25
Tasks with a start or due date can be marked as recurrent. To mark a task as recurrent use
r: followed by a repetition specification.
A repetition specification can be:
- an adverb:
- a number followed by a period:
1.year(both singular and plural forms are accepted.
Do this task every three days r:3.days This task repeats every year r:1.year This task repeats every three months r:3.months
When a repeating task is marked as completed, a new instance is created. The recurrence interval is used to determine the new due and start dates of a task. These are computed by adding the amount specified by the
r tag to the day in which the task is completed.
For instance, if the task:
Deliver gifts d:2012-12-25 r:1.year
is marked as complete on
2012-12-25 with the
do command, a new task:
Deliver gifts d:2013-12-15 r:1.year
is created at the end of the file.
(Notice that if you mark it as complete on
2012-12-29, the new due date will be
The repository is forked from jsahlen/todotxt, who also wrote most of the code; this fork adds management of date.
The nice organization of the original project made this extension very easy to write.
Bugs might belong to this fork or to the original code. If you think you found a bug, please get in touch and I’ll try to sort the thing out.