taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

Display task as tree

Open pinpox opened this issue 7 years ago • 8 comments

Hello,

I would propose to implement a command to display the selected tasks as a tree using their dependencies. The use case for this would be to view the dependencies of tasks easily.

The actual display of the tree could look similar to what the "tree" utility looks on linux. image

pinpox avatar Apr 04 '18 16:04 pinpox

This is not enough, because you can easily build directed acyclic graph, like below, that cannot be correctly displayed with tree-like command.

ghost avatar Apr 25 '18 23:04 ghost

Well you could display items twice or just display the items with only one dependency. But I see your point

pinpox avatar Apr 25 '18 23:04 pinpox

This is not so easy, because even in this simple example you need to display d and e items three times to capture all dependencies. More nodes means much more duplication.

Something like git log --graph might be a better way.

ghost avatar Apr 25 '18 23:04 ghost

I'm very open to representing dependencies in a more visual way, but a simple tree is not enough, as @maln0ir indicates. I'm leaving this issue open, hoping for more input.

pbeckingham avatar May 12 '18 15:05 pbeckingham

One could show a task only if all of its dependencies appeared earlier in the tree. The above example would look like this:

a
|- b
|- c
   |- d
      |- e

thomasrebele avatar Aug 15 '18 05:08 thomasrebele

The data is already there. As far as I understand it TaskWarrior doesn't concern itself with building ever more elaborate display measures for the same data.

This is a good job for an external script. Looking around I found the ruby script twdeps. It generates PNG images like this: IMAGE

If that's not for you then maybe look at the pythons cript taskwarrior_depends.

ChargingBulle avatar Sep 07 '18 08:09 ChargingBulle

I'm very open to representing dependencies in a more visual way, but a simple tree is not enough, as @maln0ir indicates. I'm leaving this issue open, hoping for more input.

I, for one, would love to have something like twdeps built into taskwarrior. (A tree would definitely not do the job.) A picture says a thousand words. I'm fairly clueless when it comes to these things, but would mermaid charts be a possibility? (https://mermaid-js.github.io/mermaid/#/) I know that Roam Research incorporated them not too long ago …

I would change the direction of the arrows in the diagram above, though. To me, the arrows in that diagram make it look like the dependencies work in reverse.

I have tried to install twdeps but I just can't get it to work. Besides taskwarrior_depends (which hasn't had many updates for about 10 years) is anyone familiar with any other options for the time being?

apkawel avatar Aug 01 '21 05:08 apkawel

I've made a simple script for this. I think this should be a configuration on description column, but Im not sure how this should integrate with other possible values.

rmonicovia avatar Jul 26 '24 16:07 rmonicovia