Combine a select query with rendering the TaskPaper object to a string. For example, consider the following example: td = TaskPaper.parse(open('/path/to/my/todo-list') print td.format(lambda nd: 'today' in nd.tags) This will show all items tagged with @today _and their parents_, just like the TaskPaper GUI will do when filtering by a tag.
Previously, print_tree only printed the descendents, which was less useful and not intuitive. Also, TaskPaper objects are now counted as a node and may be passed to print_tree as an argument. This is a first step towards enabling parsing of directories containing multiple taskpaper documents in future releases.