Saturday, December 31, 2011

Track Your New Year Resolutions With ii.do

I know, I know, it’s a bit of a cheesy title to promote my Open Source project but here me out - it really does work. Though I didn’t really write it to track my new year resolutions (I’ve never found them effective beyond a week), I did write it out of constant frustration with not finding a TODO productivity tool that stuck with me.

Let me explain… I’ve tried EVERYTHING!

Google Calendar & tasks

Sending myself Emails

Wiki (Dokuwiki, Mediwiki, Twiki etc.)

Tomboy

Tomboy with UbuntuOne & Android App

EverNote

Remember the Milk

Gedit notes on my desktop

Post-it notes widget

Actual Post-it notes

Old-skool diary

Pieces of paper including backs of payment receipts

From the above list, if anything came remotely to sticking as a habit, then it’d be the sticky notes & pieces of paper. I’m not suggesting the other methods suck, but I wouldn’t use it beyond a couple of weeks.

Why was it that despite me spending hours on a computer, the best thing that had a chance of remotely working was old-skool pen & paper? And then it hit me. A good todo App should be:

In your face!

Really simple to use (like pen & paper)

Did I mention in your face?

Now my solution isn’t for everyone. At this moment, it is intended ONLY for fellow geeks who spent a lot of time in the command line (GNU & UNIX only), and I call it ii.do.

What is ii.do

ii.do, pronounced “I do”, but really a roman play on 2.do, is a command line todo list manager that uses a simple text file and simple MarkDown syntax to track your todo tasks. The beauty of using MarkDown syntax is in it’s resemblance to the natural way we jolt down text on a piece of paper.
ii.do is optimized around querying tasks as opposed to updating tasks. For entering and updating tasks, it uses a plain old vim text editor, which has syntax highlighting for Markdown built-in. If vi is not your thing, then it’s relatively easy to configure another editor by exporting the shell $EDITOR variable.

The other main design goal I had was to make it into a standalone shell script which could stand (mostly) on its own. Except for standard shell commands like sed, grep and bash itself, it doesn’t demand much.

But the main power of ii.do comes ONLY (and I repeat ONLY), if you modify your shell to :

Define an easy alias (such as t) which can be used to summon ii.do from anywhere within the shell

You modify your $PS1 shell prompt to update it with the pending number of tasks (this is the in your face bit)

The second one point above is important, if you plan on actually using it productively, for there is nothing like an App stalking you with a reminder of how many things you have left todo.

Installing ii.do

You can download a tarbar ball of ii.do from github. Then just extract it to your home directory, make the shell script executable (just in case) and finally copy the sample todo.markdown to your $HOME

Using ii.do

Now the fun begins! Lets start with the most basic.

t -h
Version: 0.6.1
Usage: ii.do [-f todo_file.markdown] [-T topic_number] [options]
Options :
-e Open TODO file using $EDITOR
-n Count number of pending tasks. Can be filtered using -x, -X etc.
-X Filter to show only pending tasks
-x Filter to show only completed tasks
-i Filter to show only important tasks
-t Filter to show only topics with topic_number
-C Don't colorize output (useful for piping)
-H HTMLize the output
-S "$PS1" Will return modified PS1 prompt to contain pending task count
-h Show this help screen
By default, we expect a ~/todo.markdown to be in your $HOME if not overridden
by the -f option. Refer to http://github.com/geekaholic/ii.do for examples of
creating this file.

To edit a file using vi or $EDITOR

t -e

Using markdown syntax to maintain todo.markdown is simple. You start out with a main heading called a topic.

As you might have guessed the --- are the alternate form for a sub level topic. This way you have have multiple top level topics followed by sublevel topics, having tasks at each level.Now we got the data entry part sorted, lets see how we can query the task list.

t

Will show all your tasks using terminal colors.To filter tasks to show only pending or only completed ones:

t -X
t -x

To filter by topic, so that it only shows tasks belonging to one topic including it’s sub topic:

The above will show everything up to topic 4 (Home Work)To count the number of pending and competed tasks

t -X -n
t -x -n

To update the task to mark it as complete, place an x in front of the task

* x Take out the trash

To mark a task as important, place an ! mark in front of it

* ! Go to gym at least 3 days a week

To mark a task with a high priority, place the priority number in front of the task

* (1) Finish history essay

Finally, ii.do has two options that customize the output. The first option is to turn off color which is handy when you want to pipe the output of ii.do with more unix commands.

t -C | grep '^*'

The other option is to export the todo list as html

t -H > ~/todo.html

Other Uses

Besides tracking my todo list on a daily basis, I’ve recently found another use for ii.do - track my bookmarks. I know, your probably thinking of delicious or firefox/chrome bookmark syncing but for me those solutions just don’t cut it. For one, I use about 3 browsers and finding old bookmarks can be a real pain. So now I just use an alias with a custom bookmarks.mdown

alias bm="$HOME/ii.do/ii.do -f $HOME/Dropbox/bookmarks.mdown"

Another use was to keep track of lecture topics by marking them off as I taught them over a period of two months. I also use it to keep track of some interesting quotes I come across, just for inspiration.

About Me

I enjoy working on interesting and challenging products that have the potential to change the world. I love thinking about technology and how it can positively transform society. Specializes in Web / Cloud Apps, LAMP, Linux Dev Ops & other Open Source Technologies.

Besides technology I enjoy geeking out to gaming, photography, rocking to all genera of music from Jazz to Techno and watching Anime!