Simple Planning With Plain Text

Gina Trapani wrote a series of articles at Lifehacker.com (see below) where she kept a "to do list" in a plain text file named todo.txt. A couple scripts help folks use it. My daddy always told me to put dates on everything. So I changed her format around just a bit.

Portability

Why use "plain text" files? "Plain text" really means ASCII. The main reason is portability. Such files can be read by some program on pretty much any computer. One can haul the plan (and supporting scripts) around on a USB stick.

Readability

This is a red herring. If one means readable by machine, then you're really talking about portability. If one means readable by humans, then you need a program to display the file. Sophisticated programs can make a file more readable, at the expense of portability.

Plan Format

I suppose any file name would do, but I like "plan.txt".

The Basics

date {time|importance} blather

Dates should be of the sortable form yyyy-mm-dd. Times should be hh:mm, where hh goes from 00 to 23. Importance is A, B, C, D, or E.

  1. Urgent
  2. Important
  3. Whimsical
  4. Done
  5. Abandoned

To Do

We now have the makings of a to do list where we can list chores. The date is the date we intend to do them. When a chore is done or removed the original date and importance should remain for audit.

Gina Trapani recommends noting projects and contexts in chores. Projects are encoded as p:project. Contexts are encoded as @context.

Calendar

If we have time instead of importance then it is an event or appointment.

Display

Note that this format makes it pretty easy to sort and to grep for a date, month, or item. e.g. grep "^2006-05" plan.txt | sort.

Commands (Scripts)

Custom commands should not be necessary. However some convenience might be appreciated. We try to keep the number of programs needed to a minimum for maximum portability. These programs should already be installed on Linux, Cygwin, and Mac OS X: awk, date, expr, grep, sed, sort, and test.

Note that plan.txt should be sorted for this to work properly. Hence newchore.sh and didchore.sh sort their results. These scripts also copy plan.txt to plan.bak.txt to allow (single level) "undo".

Try this to update your finger .plan Unix file from your plan.txt file: chores.py <plan.txt | grep -v " @home " >~/.plan.

For that "full screen" effect, newchore.sh and didchore.sh have commands at the end to clear; chores.py <plan.txt.

It can be helpful to print the list on paper which can then be carried around. I use a notebook with pages that are eight inches tall and 5.5 inches wide. Use cat past.txt plan.txt | awk -f spacer.awk | mpage -2P -bLetter -m40l -I1 to print so that the result can be folded in half, trimmed, and tucked into the notebook.

Vim

Here is some vimscript for new chores and done chores. Put it in your ~/.vimrc if you like. Don't forget to :%!sort when you're done. You can also :%!./plans or one of the other links. Of course, you should undo after that to restore plan.txt before making any more changes.

nnoremap <silent> <leader>s :%!sort<CR>

function! NewChore()
  let failed=append(line("."), strftime("%F") . " B ")
  +1 " Go to first non-space character of the newly inserted line.
  :startinsert! " Start inserting at the end of the line.
endfunction
nnoremap <silent> <leader>n :call NewChore()<CR>

function! DidChore()
  execute "normal 0i" . strftime("%F") . " D "
endfunction
nnoremap <silent> <leader>d :call DidChore()<CR>

Someday Baby

What Next

whatnext.py is a script to help decide among candidate projects. It takes a list of projects with the first two columns indicating benefit and cost. The list is then ordered by "bang for the buck" by dividing benefit by cost. You can make gross estimates of these numbers, perhaps one to three or one to ten. Just remember that nothing is free (no zero cost).

Gina Trapani's Work

Talk to Us



- - Your Name


Valid XHTML 1.0! Valid CSS! http://www.BlossomAssociates.net/Plan/index.html 2006-05-23