Ver 011 above fixes the choice between exporting al
l filtered data, and only exporting the selected node and all its descendants.
Ver 012 now works with Keyboard Maestro
Ver 014 added info on defaults to all options in help page. (As below)
Running the python file without any arguments at all would export all active data (without links or notes) to a file called current_tasks.itm in the same directory as the script.
Adding the switches -n -l -r for example, would include notes and links back to the original OmniFocus object, and prepend the notes with any recurrence info.
Usage: ofoc_to_mindmap_021.py [options]
-h, --help show this help message and exit
-a ROOT, --root=ROOT Specify a sub-tree by the OmniFocus id of its root
node. Defaults to None.
-x FORMAT, --format=FORMAT
Set the export format [itmz | itm | opml | txt | md |
ft]. Defaults to tab-indented txt. md is simple
Markdown, ft is Markdown with the addition of
FoldingText's .todo mode tags for checkboxes and
struck-through done items
-o OUTPUT, --output=OUTPUT
Set the export filepath. Defaults to file named
-c COLLAPSE, --collapse=COLLAPSE
List the outline levels to collapse. Defaults to 2,4
-m TEMPLATE, --template=TEMPLATE
The pathname of an .itm or .itmz template for
iThoughtsHD. Defaults to same directory as script.
-l, --links Include OmniFocus task/folder links. Defaults to false
-n, --notes Include OmniFocus notes. Defaults to false
-r, --recurinfo Add any repetition information to start of notes.
Defaults to false
-f FOLDER_SQL, --folders=FOLDER_SQL
SQL clause[s] to limit which FOLDERS are exported.
Defaults to effectiveActive=1
-s SINGLES_SQL, --singlelists=SINGLES_SQL
SQL clause[s] to limit which SINGLE ACTION LISTS
are exported. Defaults to status=active,
folderEffectiveActive=1, dateCompleted is null
-p PROJECT_SQL, --projects=PROJECT_SQL
SQL clause[s] to limit which PROJECTS are exported.
Defaults to status=active, folderEffectiveActive=1,
dateCompleted is null Use a comma for AND (OR is not
supported) e.g. -p 'childrenCount > 0,
blockedByFutureStartDate = 0'
-t TASK_SQL, --tasks=TASK_SQL
SQL clause[s] to limit which TASKS are exported.
Defaults to dateCompleted is null,
-i INBOX_SQL, --inbox=INBOX_SQL
SQL clause[s] to limit which INBOX TASKS are exported.
Defaults to all inbox tasks