Tracking your tasks at the command line
In the computing world, there are few things simpler than a text file, and todo.txt, written by Web developer and writer Gina Trapani, leverages that fact nicely. As the name implies, this utility keeps your to-do items in a text file called todo.txt. A bash script called todo.sh does the heavy lifting; a Python script is also available. Using todo.sh, you can add and delete to-do items, update them, mark them as done, and prioritize them.
todo.sh is easy to use. If you’re a command-line tyro, you’ll quickly get the hang of it — especially if you use the online help — just type todo.sh -h. As a test, I got my wife (who’s a self-confessed GUI addict) to give it a whirl. After spending a few minutes getting oriented, she was confidently and competently using the script.
Using todo.sh
First off, download the script and install it somewhere in your path. To add a to-do item, open a terminal window and type the following at the command line:
todo.sh a [your task]
where [your task] is the text of the to-do item — for example, “Finish patching the drywall leading to the basement.” In case you’re wondering, that’s one of my many outstanding tasks. The task is written to a text file called todo.txt.
View your tasks by entering the command todo.sh list. To mark a task as complete, type todo.sh a [linenumber], where linenumber is the number of the line in the file todo.txt on which the task resides.
Getting your priorities straight
Of course, not every to-do item has the same priority. Some will be more important than others. You can prioritize tasks using letters of the alphabet. You can, for example, mark you most important tasks with an “A.” Mark tasks of lesser importance with a “B,” and right on down the alphabet. To prioritize a task, type:
todo.sh p line_number
The drawback to this is that you need to know the number of the line in todo.txt that contains the task (specified by line_number). On the other hand, items that are prioritized are color-coded when you view them using the command todo.sh listall.
Backing up
If you’re a busy person, then your todo.txt file will quickly become full of both pending and done items. You can move the done items out of the file by entering the command:
todo.sh archive
The done items are written to a file called done.txt.
Getting help and helping out
todo.txt has an active user community. Not only is there a Yahoo! Group devoted to it, but users have contributed a number of extension to todo.txt, such as a tab completion script and a Python script for reporting on the status of tasks. You can also download a whole whack of Python scripts related to todo.txt from Google Code.
The Python scripts are very flexible, and pack more features than the shell script. Like what? Like the ability to open your to-do list or completed task files in a text editor, launch the reporting script I mentioned earlier, and add recurring tasks to your to-do list using a cron job and information in a separate file.
Overall, though, using a text file is a simple solution to the problem of keeping track of your tasks. Of course, it only works if you use it …
Related posts:
