random thoughts on working, gtd, getting things done, hobbies, semiconductor industry,scripting etc.

Saturday, February 7, 2009

Capturing thoughts, An Idea can strike anywhere. Are you ready to capture it? People mostly prefer a pen and paper method for capturing the idea simply because they can carry a small pocketbook anywhere and everywhere. For a software professional who spends most of his working period in front of the computer a software application is preferable. But the question remains which application? When the thought strikes you is the application available and ready to capture your thought? or do you need to navigate through a set of menu's to launch it then a set of tabs/dialog's to enter your thought into your system?
There were a few posts on how to do this through launchy. But the technique is general enough to work with any system
  1. For a unix shell you can write a single line shell script add.sh which will "echo`date` $*>>~todo.txt" Or write an equivalent alias.
  2. For windows you have a batch script add.bat which will "echo %DATE% @ %TIME% %*>>C:\\todo.txt"
  3. This script can now be called in multitude of ways via a terminal, WIN+R, launchy, gnome-do, etc. to capture the idea that you have.

I am using a simple format string of
project:delegatedTo, Task description @context time
e.g.
book:me, setup lunch with editor @phone tomorrow

Perl and ruby have plugins to translate natural language date strings to the actual dd-mm-yyy dates anyone who has used google calander knows what I am talking about.
so instead of teh batch scripts we can have a simple perl script to parse the above string and put it into the necessary format
today is 07-02-2009 so we want perl to translate the above string to
book:me, setup lunch with editor @phone 08-02-2009


So we have captured the above string but what can we do with it?
Let us add a few more options to our perl script to convert the data to XML Format. Once we have our task in XML Format it is a matter of a few XSLT files or maybe more perl script to convert our tasklist to freemind, planner, ganttproject or Microsoft Excel
The perlscript to perform the task capture and convert it to XML is available here

No comments: