tastic.workspace.workspace module

sorts the contents of all taskpaper files via workflow tags

Author:David Young
Date Created:November 5, 2016
class tastic.workspace.workspace.workspace(log, fileOrWorkspacePath, settings=False)[source]

tools for sorting, archiving and indexing tasks and maintaining the contents of all taskpaper files within a given workspace

Key Arguments:
  • log – logger
  • fileOrWorkspacePath – the root path of the workspace you wish to sort the taskpaper docs within, or the path to a single taskpaper file
  • settings – the settings dictionary

Usage:

To setup your logger, settings and database connections, please use the fundamentals package (see tutorial here).

To initiate a taskpaper workspace object, use the following:

from tastic.workspace import workspace
ws = workspace(
    log=log,
    settings=settings,
    fileOrWorkspacePath="/path/to/root/of/workspace"
)

or to target a single taskpaper document use instead the path to the file:

from tastic.workspace import workspace
ws = workspace(
    log=log,
    settings=settings,
    fileOrWorkspacePath="/path/to/doc.taskpaper"
)
archive_done()[source]

move done tasks from the document’s ‘Archive’ project into an adjacent markdown tasklog file

Usage:

To move the archived tasks within a workspace’s taskpaper docs into -tasklog.md files use the archive_done() method:

ws.archive_done()
sort()[source]

sort the workspace or individual taskpaper document via the workflow tags found in the settings file

Usage:

To sort all of the taskpaper documents in the workspace via the workflow tag set with the settings file, for example:

workflowTags: "@due, @flag, @hold, @next, @someday, @wait" 

use the sort() method:

ws.sort()