Skip to content
/ mit Public

Most Important Tasks addon for Gina Trapani's todo.txt-cli.

Notifications You must be signed in to change notification settings

codybuell/mit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MIT (Most Important Task)

Version License

Overview

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.

Installation

  1. Install and configure todo.txt-cli.
  2. Ensure TODO_ACTIONS_DIR is defined in todo.cfg or in your profile.
  3. Place mit in your actions directory.
  4. Ensure mit is executable.

Bash Completion

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

Usage

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 or 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.

Format

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)

License

MIT is open-sourced software licensed under the MIT license.

About

Most Important Tasks addon for Gina Trapani's todo.txt-cli.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages