Most Important Tasks addon for todo.txt-cli.
MIT adds functionality to Gina Trapani's todo.txt-cli. MITs are intended to be critical tasks that need to be accomplished on a particular day. You can read more about MITs here:
The MIT plugin also supports assigning tasks to a year, quarter or month.
- Install and configure todo.txt-cli.
- Ensure TODO_ACTIONS_DIR is defined in todo.cfg or in your profile.
- Place mit in your actions directory.
- Ensure mit is executable.
If you would like to add some auto completion to MIT as well as for your todo.sh contexts and projects, add the following to your ~/.bash_rc
. This assumes you have aliased todo.sh
to t
.
# todo-txt completion
_todotxtcli() {
local cur=${COMP_WORDS[COMP_CWORD]}
local pre=${COMP_WORDS[COMP_CWORD-1]}
local cst="${COMP_WORDS[COMP_CWORD-2]}_${COMP_WORDS[COMP_CWORD-1]}"
case $pre in
mit )
COMPREPLY=( $(compgen -W "today tomorrow monday tuesday wednesday thursday friday saturday sunday january february march april may june july august september october november december" -- $cur) )
;;
* )
if [[ $cst =~ ^mv_[0-9]+$ ]]; then
COMPREPLY=( $(compgen -W "today tomorrow monday tuesday wednesday thursday friday saturday sunday january february march april may june july august september october november december" -- $cur) )
else
COMPREPLY=( $(compgen -W "mit `eval todo.sh lsprj` `eval todo.sh lsc`" -- $cur) )
fi
;;
esac
}
complete -F _todotxtcli t
The mit addon can be used to both view and add MITs.
To add mits:
todo.sh mit [DATE|DAY] [task]
$ todo.sh mit tue buy dog food @chores
113 {2013.06.04} buy dog food @chores
TODO: 113 added.
$
A date or day is required along with the task. The DATE|DAY format is as follows:
for daily mit's
---------------
'today'
'tomorrow'
day of the week or abbreviation** i.e. monday|mon
YYYY.MM.DD i.e. 2080.01.15
for yearly mit's
----------------
YYYY i.e. 2080
YYYY.00.00 i.e. 2080.00.00
for quarterly mit's
-------------------
QN ** i.e. q1 | q4
YYYYQN i.e. 2080q4
YYYY.QN i.e. 2080.Q1
for monthly mit's
-----------------
month name ore abbreviation** i.e. january|jan
YYYY.MM.00 i.e. 2080.01.00
YYYYMM i.e. 208001
YYYY.MM i.e. 2080.01
** Assumes current week|or year, if chosen day|date has already
passed then it will roll to the next upcoming day|date.
To view mits:
todo.sh mit [DAY|DATE] [not @context|@context]
$ todo.sh mit @chores
Tuesday, June 04:
buy dog food @chores (113)
Specifying a context to filter by is optional but can be helpful if you define MITs for multiple contexts. MITs will be grouped by day with any old incomplete MITs listed under "Past Due:". You can also specify a day or date to narrow the returned MITs. All day/date formats listed above are supported.
$ todo.sh mit today
watch some videos on youtube (1)
$ todo.sh mit wed @work
finish tps report @work
To move mits:
todo.sh mit mv [ID] [DATE|DAY]
$ todo.sh mit mv 113 tomorrow
TODO: MIT 'buy dog food @chores' moved to tomorrow.
$
As with adding mits dates must be in the format of YYYY.MM.DD, day names are accepted, or you can specify "Today" or "Tomorrow". Thanks to rcraggs you can now convert non-mit tasks to mits with the move command as well, the usage is the same.
To convert mits to normal tasks:
todo.sh mit rm [ID]
$ todo.sh mit rm 113
Removed MIT from task 113
$
Another bit of functionality provided by rcraggs that allows you to convert a mit to a normal task.
MITs are stored directly in the todo.txt file with the following format:
{YYYY.MM.DD} task info @context # standard mit with set context
{YYYY.QN.DD} task info # a quarterly mit
{YYYY.00.00} task info # a yearly mit
{YYYY.MM.00} task info # a monthly mit
{YYYY.MM.DD} (A) task info @context # prioritized mit with set context
{YYYY.MM.DD} (A) 2013-05-29 task info # mit with priority and date added (-t option)
MITs are displayed as follows:
--------------------------------------------------------------------------------
. .
. Daily MIT's .
. .
--------------------------------------------------------------------------------
Past Due: # all past due items displayed here
mow the lawn @home (13) # task numbers displayed on the end
Today:
change oil in car (23)
prepare tps report @work (15)
Wednesday:
buy groceries @shopping (28)
Monday, December 17: # anything a week out or more gets a date
call mother (30)
MIT is open-sourced software licensed under the MIT license.