Todo.txt support scripts for GTD.
Project description
todo.txt-gtd
My recipe for customizing a todo.txt environment for Getting Things Done.
Scripts
The Cleanup Script
Given the following text in the file ~/Dropbox/todo/todo.txt:
Get an oil change @errands +CarMaintenance
Get a Haircut @errands +Grooming
Check the car battery water level @home +CarMaintenance
... running the tdtcleanup script will convert that file to this:
# CarMaintenance
#
Get an oil change @errands +CarMaintenance
Check the car battery water level @home +CarMaintenance
# Grooming
#
Get a Haircut @errands +Grooming
# _None
#
Now todo.txt can be treated as a comprehensive Projects file. Tasks are organized by Project, and arbitrary text related to projects can be added as comments.
A '#' comment consisting of a single word is a Project Header, defining the default project for following tasks. The final _None project is special - it collects tasks that are added using various todo.txt applications.
On subsequent runs, tdtcleanup will do the following:
- Sort Project Sections alphabetically, by Project Name
- Add the '+' project tag to any tasks in a Project Section that don't already have one. A task is defined here as a line of text that includes an '@' context. This processing doesn't happen in the _None section.
- Move tasks to the proper Project Section, if they aren't already there. The Section is created, using a Project Header, if necessary.
The Context Listing Script
The tdtlist script lists the tasks in todo.txt, by context.
If you process either of the above todo.txt files through tdtlist, it will output the following
@errands
Get an oil change @errands +CarMaintenance
Get a Haircut @errands +Grooming
@home
Check the car battery water level @home +CarMaintenance
The list is saved in text and LibreOffice ".odt" formats. It can be optionally automatically opened after it is created.
The Project script
The tdtproj script supports working with a single project, or group of projects. It opens an edit session with just the specified project section from the todo.txt file, and replaces that section after the session is complete.
If all of the lines are deleted from the edit session, no changes are made to the original todo.txt file. If just the header line is kept, all other lines are deleted from the original.
Run tdtproj with the "-l" option to get a current list of projects.
A bash completion script is available that responds to tab completion with an appropriate project list.
The Backup script
tdtbackup is a utility script for making rotating backups of the todo.txt file.
Working with a GTD todo.txt
Always add an '@' context to tasks, to put them on the proper GTD list, and to identify them to tdtcleanup.
Either add '+' project name to individual tasks, or physically move them to the appropriate Project Section.
Add comments, as necessary, to fully document each Project.
For the Weekly Review:
- Run tdtcleanup
- Delete completed tasks
- Update the '@~' -> '@' context on multi-step tasks as necessary
- Add tasks and '+' project tags, as needed
- Run tdtcleanup again
I've found that running "for proj in `tdtproj -l`; do tdtproj $proj; done
" is a mind-clearing way to
accomplish this.
Configuring Existing todo.txt Apps
Filter on '@' to limit your task lists to just tasks. I use a '~' as a special context flag (e.g. '@~errands') for tasks that cannot be performed yet due to an uncompleted previous step. If you pick up this convention, you may want to filter out '@~' from your lists as well.
Avoid the 'archive' operation. This typically will remove duplicate lines in todo.txt. This can wreak havoc on formatting, eliminating white space and empty comment lines in the file.
Specific Todo.txt Apps for GTD
I've used the classic todo.txt CLI with success. As mentioned previously, avoid the archive operation.
I've come to prefer ToPydo, for its support of threshold dates and recurrance. Note that it needs a small change to avoid eliminating blank lines. Make sure to use the '-a' option to disable auto-archive on task completion.
SimpleTask works well on Android. Make a "Current Tasks" filter with the "List" tab consisting of a checked "Invert Filter" box, plus check "-" and all contexts you want to eliminate (e.g. "someday").
Run 'tdtlist -l' for a printable todo list, for offline use.
Of course, a primary way of interacting with the todo list is by editing the todo.txt file directly.
My .bashrc to support todo.txt:
alias vitodo='vim ~/Dropbox/todo/todo.txt; tdtcleanup'
alias cdtodo='cd ~/Dropbox/todo/'
alias todo='topydo -a -t ~/Dropbox/todo/todo.txt'
And my cron:
0 2 * * * tdtbackup; tdtcleanup; tdtlist
Installing
sudo apt-get update
sudo dpkg -i tdtgtd*.deb
sudo apt-get -f install
pip install:
pip install todo.txt-gtd
Usage
$ tdtcleanup -h
usage: tdtcleanup [-h] [-f FILE]
Clean up the todo.txt file in a GTD fashion
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE the todo.txt file location (defaults to
~/Dropbox/todo/todo.txt)
$ tdtlist -h
usage: tdtlist [-h] [-f FILE] [-l] [TERM [TERM ...]]
List the tasks in todo.txt, by @category
positional arguments:
TERM search terms to filter the reported tasks
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE the todo.txt file location (defaults to
~/Dropbox/todo/todo.txt)
-l, --launch open the task list, after creating
Process the todo.txt file, and save tasks lists, by context, in text and
LibreOffice formats. The lists are saved in the same directory as todo.txt.
Optionally, the LibreOffice list can be automatically opened.
$ tdtproj -h
usage: tdtproj [-h] [-f FILE] [-l] [TERM [TERM ...]]
Work with one or more GTD projects in todo.txt
positional arguments:
TERM search terms to filter the project(s) to use
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE the todo.txt file location (defaults to
~/Dropbox/todo/todo.txt)
-l, --list just list the projects in the current todo.txt file
Edit one or more isolated projects in a todo.txt file (todo.txt projects are
denoted by a a leading "+"). If the entire project is deleted during the edit
session, the original project is preserved in todo.txt. If just the Project
Header line is kept, then the project is deleted in the original. The default
text editor, set by 'update-alternatives', is used. This can be overridden by
setting the 'EDITOR' environment variable.
$ tdtbackup -h
usage: tdtbackup [-h] [-f FILE] [-b BACKUPDIR] [-n NUM]
Back up the todo.txt todo.txt file
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE the todo.txt file location (defaults to Dropbox)
-b BACKUPDIR, --backupdir BACKUPDIR
the backup location (defaults to "todo/backup" in
Dropbox)
-n NUM, --num NUM the number of backup files to keep (defaults to 14)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file todo.txt-gtd-0.2.tar.gz
.
File metadata
- Download URL: todo.txt-gtd-0.2.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4736f73c932979729f7dd2e91e1dea4d0a1331c4b624361fd72cc2a6da9d9d7 |
|
MD5 | a763a76535e827221efec7588d822f6e |
|
BLAKE2b-256 | 0cd1978faa6ca42012838225ffc3f3f13548130567f9de0dd41b97977dcf4d5f |
File details
Details for the file todo.txt_gtd-0.2-py3-none-any.whl
.
File metadata
- Download URL: todo.txt_gtd-0.2-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9782652c4823c3062fd7ef62151d2767e190877c89c7f1549c74a22f28c81104 |
|
MD5 | 20ebd71572fcec9a2551117b0a17cf1e |
|
BLAKE2b-256 | a8314eee29a9f92705a3c3e0bd5c7faad048ac1a4f0e9be64eb441a31e9d7360 |