One script to parse a TaskPaper formatted file and print a summary of current, overdue and upcoming actions.
Another script to parse a TaskPaper formatted file and print the actions per context.
I made some small changes to remove errors under Python 3 (only tested on Windows). As Python 3 doesn't seem to include dateutil run pip3 install python-dateutil
first.
python tpp.py <input file>
The <input file>
will be parsed for tasks containing the @today, @due( ), @start() tags. Tasks with the @done tag are ignored.
The output will show the relevant tasks found in four sections.
Ex;
SUMMARY for <filename> [<date>]
TODAY
[Project1] - Task 1 @today
[Project1] - Task 2 @today
[Project2] - Task 1 @today
OVERDUE
[Project1] - Task 1 @due(<any date in the past>)
[Project3] - Task 1 @due(<any date in the past>)
DUE THIS WEEK
[Project3] - Task 2 @due(<any date in the next week>)
[Project4] - Task 3 @due(<any date in the next week>)
STARTING THIS WEEK
[Project1] - Task 4 @start(<any date in the next week>)
[Project2] - Task 3 @start(<any date in the next week>)
If an error comes up for parsing any line in the file, it will be show at the bottom as:
ERROR PARSING THESE LINES
(line text, error)
(line text, error)
- February 2 2014; Inital version.
- February 16 2018; Forked to make it work with Python 3 on Windows
- February 5 2021; added statistics for amount of done tasks
- May 26 2021; added list of tasks per context in gtd.py
- May 27 2021; use argparse
- May 29 2021; changed parsing of action lines