Select Page
NOTE: This is a static archive of an old blog, no interactions like search or categories are current.

I’ve wanted to play with the GLI gem from Dave Copeland for a while after seeing his presentation on writing CLI tools in Ruby – he also has a book due on the subject that I’m quite keen to get.

I hate all task trackers, todo lists and everything like it, I’ve spent lots of money buying all sorts of tools with syncing and reminders and whatever and never end up seeing it through. I’ve always attacked the problem from my desktop, phone or tablet front but I realize I don’t actually use any of those. I use the CLI. I’ve had some ideas like using sub-shells to track progress on tasks while working in my Unix CLI where I live so I thought I’ll give it a go.

So this weekend I finally sat down to play with GLI and wrote a little task tracker. GLI is quite nice, it’s not perfect there’s a few things I’d have done differently. But it saves so much time and brings all important consistency – there really isn’t enough wrong with it that you wouldn’t want to use it as the benefits are huge.

The task tracker I wrote is designed for the CLI, it has the usual create, edit, close work flow so I won’t be going into much of that but see below:

$ alias t=gwtf
$ t a this is a sample task
3 (open): this is a sample task
$ t ls
    3    this is a sample task
 
Items: 1 / 2
$ t done 3
3 (closed): this is a sample task

Apart from these basic things though each task has a worklog where you can record activities associated with this task:

$ t log 3 did some work on this sample task --hour=2
Logged 'did some work on this sample task' against item 3 for 2 hours 0 minutes 0 seconds

So this just tracks that 2 hours of work was done on the item, this is nice if the work isn’t CLI based, but if they are CLI based:

$ t shell 3
Starting work on item 3, exit to record the action and time
$ tmux attach-session -t foo
# do your work
$ exit
Optional description for work log: Added some code feature
Recorded 30 seconds of work against item: 3 (open,2): this is a sample task
$ t show 3
         ID: 3
    Subject: this is a sample task
     Status: open
Time Worked: 2 hours 0 minutes 30 seconds
    Created: 03/11/12 10:30
 
Work Log: 
             03/11/12 10:33 did some work on this sample task (2 hours 0 minutes 0 seconds)
             03/11/12 10:36 Added some code feature (30 seconds)

So here I went into a sub shell for this task, did some work in a tmux session and used gwtf to record the time spent – 30 seconds. When viewing the item all the work done is added up and a total is showed above.

In the shell you’ll find environment variables for the current task ID, description and project I use this to give myself some visual feedback that I am working on a task as below

It supports projects so you can group related tasks into a project. All the data is stored in simple JSON files in your home directory and it makes backups of your data on every change.

Hopefully someone finds this useful, I’ll probably be tweaking it a lot to see if I can finally create a solution to this problem I like.

The code is on GitHub and you can just install the Gem.