Skip to main content

task2dot

This program helps with the creation of visualizations of todo lists. It works as a simple filter between taskwarrior and graphviz.

The code is now on https://pypi.org and can be installed via

python3 -m pip install task2dot

if you prefer to work with installed software, compared to interpreted source code. Otherwise execution is performed via python3 task2dot/task2dot.py.

general usage

At the command line write

task export | task2dot | dot -Tsvg > test.svg

With this, all todo items that you have ever created are fed into task2dot. Without any arguments, it just translates the export into a format that is suitable for graphviz whose output is saved in the file test.svg. We can expect this to result in an insanely messy network graphics.

For clarity, I will not show the dot command and the output redirection into a file in any the following code snipptes. Note that those have to be added for obtaining useful commands.

When exporting data from taskwarrior one has to explicitely state that one only wants to export pending tasks:

task status:pendung export | task2dot

See a working example: example graph from taskwarrior list

what are the nodes, what are the edges

Every task in the taskwarrior export is a node in the dot graph. The text in the task's nodes are its descriptions and all of its annotations, except for the information of items being started or stopped. Also projects and tags are nodes. The projects and the tasks are connected and the tasks are connected with its tags. The dependencies between tasks are shown as well.

User defined attributes are supported as well. If the task configuration file is ~/.taskrc or can be found in the environment variable $TASKRC then all user defined attributes are shown as nodes that are connected to its respective tasks. This usually is overkill, which is why there are two mechanisms to exclude nodes and connections from the graph.

node and edge exclusion

node exclusion

To exclude a specific node write

task status:pending export | task2dot -node

Then there will be no node with the content 'node' in the output graph.

So why is this useful? If you try to implement Kanban or something similar you are very likely to have a certain tag or a user defined attribute, like todo far too often for having it in a graph visualization. Almost all tasks would be connected to it via edges, which is useless. Also, if you export taskwarrior data, which is filtered with a specific tag will cause the resulting graph having a lot of connections to that tag. So the following visualization would be useful:

task status:pending +work | task2dot -work

node type and edge exclusion

A specific type of node can be excluded by using two hyphens. For example, not showing any project nodes looks like this:

task status:pendung export | task2dot --project

Or not showing any tags:

task status:pendung export | task2dot --tags

In my workflow, paths and emails ids are attached to tasks, so I need to write

task export | task2dot --path --email

It is also possible to exclude certain connections also by using double hyphen. Let's get rid of all connections from tasks to tags:

task export | task2dot --task-tags

more connections: overnext neighbors

It is possible to add additional edges than what taskwarrior exports directly. One could for example add edges between projects and tags because they are connected by tasks that have both. If one then removes the tasks one can look at a graph that shows us which 'actions' are needed for certain projects, if the tags represent 'actions'. Similarly to edge exclusion, we use ++node1-node2 to add additional edges.

task export | task2dot ++tags-project --task

Release files for task2dot 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for task2dot 0.0.11
File Size Uploaded
task2dot-0.0.11.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for task2dot 0.0.11
File Interpreter ABI Platform
task2dot-0.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / task2dot-0.0.11.tar.gz

Download URL task2dot-0.0.11.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
48d718709313fda312cba1a401bbb7e787fb77c069195a4e6973d88e535046a0
BLAKE2b-256 checksum
How to use checksums
9da794fbec40d3969518f4f9f07aabfbedada146c2f052a152f0e4958dc0d184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.8

Release files / task2dot-0.0.11-py3-none-any.whl

Download URL task2dot-0.0.11-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8aa3a95a47e3a7da13ccc7e5fd8eff49e1805369e6ba153762b81f89640ba70
BLAKE2b-256 checksum
How to use checksums
1d5adf47a167f18bd536350739088ac1a9399183e0a90a04a3363d7800778047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.8

Release history Release notifications | RSS feed

0.0.15

2 release files

This release

0.0.11 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page