PyGTD Documentation |
|||||||||||||||||||||||||||||||||||||||
OverviewIn March of 2004 I read David Allen's personal-productivity book Getting Things Done, and I took to heart its central tenets of getting everything out of your head and into a trusted system, and writing down the very next physical action that will move you toward each of your stated goals. Allen's system is missing the dimensions of Urgency and Importance that Stephen Covey preaches in his Seven Habits of Highly Effective People, and that's an especially important aspect for any system that I will use. I have several long-term projects at work, and I need reminders to spend time on the important things that aren't too urgent. I tried several software packages for managing to-do lists, including Natara's Bonsai and Llamagraphics' Life Balance, but I found that the former made it hard to keep track of what was important, and the latter made it a chore to enter data. I wanted something lightweight and flexible, and so, after several months of occasional experimentation, I decided to write my own tool. PyGTD is a simple system that incorporates major features from both Allen and Covey. It's a small Python program that crunches any number of lightly-formatted text files containing project to-do lists, and creates a prioritized to-do list based on the next physical action in each project. The prioritization takes into account the importance, the urgency, the effort required, and the schedule pressure. The project to-do files are hierarchical, enabling a very rich range of usage patterns. It's very easy to set up a programmer's text editor (I am currently using Zeus) to run the Python script whenever you hit the compile button, and the new master to-do list is automatically reloaded. Alternatively, you can just run the gtd.py script manually, from the command line or by double-clicking the file. The PyGTD software is in a state where I find it quite usable and useful, and I'm releasing it under the GPL so that anyone who thinks it might be useful can try it out and make their own modifications. If you do try it out, please drop me a line and let me know. PyGTD has been tested under windows and Linux, and I don't see any reason why it wouldn't work unchanged on a Macintosh. Be forewarned that error handling is not robust, so if you deviate from the expected input format (described below), the script will not work the way you expect (it will probably bomb out on an exception). InstallationDownload pyGTD.zip (17 kb) Unzip the archive to a convenient location (a directory called gtd will be created with all the files you need). Read the "Starting Out" section below. How it worksYou create several text files that represent your context-dependent Project and Next Action lists. The sample files included with PyGTD are:
When you run gtd.py, all of the next actions from each of these files are pulled out, prioritized, sorted, and put into a single todo.gtd file. When you make some progress on a task, you change the todo.gtd file to describe how much you've completed on that task and add any notes you have about the task. The next time you run gtd.py, the updated status is transfered back to each of your context-dependent Project and Next Action lists, and a new todo.gtd is created.
Running it
This will parse all of the Context list files in the current directory and create a todo.gtd file in the current directory. What it looks likeText files! An entry in a Context list file looks like: --start of file--
--end of file-- where
Any lines following the status options are notes. Notes lines can't start with * or a number plus ".", and should not contain elements that could be confused with the status line (the parser isn't very smart). New items need to be added to the Context list files. New sub items can be added in either the Context list files or todo.gtd. A note on indentation: The first line of each subtask of a particular task must be indented with the same number of spaces. All lines, except for the first line of root-level tasks, must be indented by at least one space. todo.gtdThe automatically-generated todo.gtd file contains entries of the form: --start of file--
--end of file-- where
In the todo.gtd file, the second line (status variables) must exist for each item, and the ID variable must be set. This will happen automatically in normal usage. One an item gets from the Context list file into todo.gtd, all changes need to be made in todo.gtd. They will get propagated back correctly to the Context list file. You can also add new sub-items to tasks in todo.gtd, and they will get propagated correctly back to the Context list files. New items cannot be added to todo.gtd, only new sub-items. Starting outI suggest modifying the included Context list files to start out, and modifying the todo.gtd file to get a sense for how the changes propagate.
CreditsDocumentation drafted by Evelyn Mitchell and edited by Keith Martin. Code by Keith Martin, with thanks to Stephen Waits for pointing me toward the datetime module, and to Evelyn for helping debug the script under Linux. |