Skip to main content

convert taskwarrior export to graphviz format and analyse projects

Project description

task2dot

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

general usage

At the command line write

task export | python3 task2dot.py | 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 | python3 task2dot.py

See a working example:

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 | python3 task2dot.py -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 | python3 task2dot.py -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 | python3 task2dot.py --project

Or not showing any tags:

task status:pendung export | python3 task2dot.py --tags

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

task export | python3 task2dot.py --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 | python3 task2dot.py --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 | python3 task2dot.py ++tags-project --task

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

task2dot-0.0.5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

task2dot-0.0.5-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file task2dot-0.0.5.tar.gz.

File metadata

  • Download URL: task2dot-0.0.5.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for task2dot-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b8052fc6f2207af26e46a63ac9150bd9e65a311c42895066acc84b11064ff54e
MD5 0516e543e25732e1977555d52d2d259e
BLAKE2b-256 b431904afb62a4af30a9e60bb49bf6781d10e8f6ec6b81abb15f4f1d2abd3bad

See more details on using hashes here.

File details

Details for the file task2dot-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: task2dot-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for task2dot-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9827862575ce9d8e9c480f1677aa958a78430c02b463c510d0cdb8ddb26bcd
MD5 043cebb288b983561b304d8dd96da9fb
BLAKE2b-256 c3d4ad75ebbe043969e84ca08f7489c2030678a82b79aa257cb581d344ebbc61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page