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.
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.
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.
I suppose any file name would do, but I like "plan.txt".
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.
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
.
If we have time instead of importance then it is an event or appointment.
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
.
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".
chores.sh [[-]n|date] <plan.txt
chores.py [startdate [enddate]] <plan.txt
chores.sh
this filters plan text to show what to do today.
It takes two optional dates.
You can create links to it to show common time periods:ln -s chores.py plans # Shows from now on into the future. ln -s chores.py yesterday ln -s chores.py today # Shows just what's on deck for today. ln -s chores.py tomorrow ln -s chores.py lastweek ln -s chores.py thisweek ln -s chores.py nextweek ln -s chores.py lastmonth ln -s chores.py thismonth ln -s chores.py nextmonth
newchore.sh [date] [A|B|C|time] blather
didchore.sh pattern [blather]
archiveplan.sh [-n|date
]chores.sh
leave undone chores in plan.txt even if they were added in the past.
This first copies plan.txt to plan.bak.txt (obliterating the old plan.bak.txt).
plan2ics.sh <plan.txt >plan.ics
birdseye.sh
Gina's Birdseyebirdseye.py
to create the snapshot done by Gina.
Of course, todo.txt
could also be fed into her todo
script,
but there is no way to get modifications back into plan.txt.
Gina's birdseye.py
requires Python
which may need to be installed separately if you don't already have it.
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.
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 u
ndo 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>
chores.sh
automatically use plan.txt just as the other scripts do?
Maybe it should, now that we have chores.py.
chores.sh
could automatically move old stuff from plan.txt to past.txt?
This is what archiveplan.sh
does now.
So maybe chores.sh
is no longer needed.
The past could be further split by year like so:
grep "^2005-" past.txt >past.2005.txt && grep -v "^2005-" past.txt >past.temp.txt && mv past.temp.txt past.txt
plan.year.txt
.undo
command would also be convenient.ics2plan
to get stuff from Korganizer or iCal.getopts
? No Cygwin doesn't have such. Dang!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).