MartinPacker / filterCSV

Tools to manipulate CSV files in a format suitable for importing into various mindmapping programs - such as iThoughts, Freemind, and MindNode.
MIT License
32 stars 8 forks source link

Add statistics for each level #14

Closed MartinPacker closed 4 years ago

MartinPacker commented 4 years ago

(Possibly on the way to a layout engine) I want number of nodes at each level and the number of distinct values at each level.

Possible syntax:

stats html

and

stats text

and

stats markdown - though here the support for tables in Markdown is a little murky so would impose my own taste.

Will create a stats branch to work on this.

MartinPacker commented 4 years ago

Maybe also stats csv.

cclauss commented 4 years ago

I do not understand the usecase. What would you do with this information?

MartinPacker commented 4 years ago

So I could easily say "45 CICS regions attaching to 8 db2 subsystems on 5 systems" - as 45 level 2, 8 level 1, 5 level 0 nodes.

Also counting nodes at each level makes it possible to layout - in SVG or HTML5 Canvas - with the maximum level node count (in this example 45) conditioning the spacing. Naïve layout but something for those who don't have eg iThoughts. BTW the HTML export sort of does this - but clunkily.

MartinPacker commented 4 years ago

CSV done. And the difficult part is collating the statistics.

cclauss commented 4 years ago

My sense would be that it should be done by traversing the tree.

MartinPacker commented 4 years ago

It's done. :-) And now so is HTML table output. Hopefully will pass the test this time - tabs versus spaces.

MartinPacker commented 4 years ago

Markdown Tables done. (According to Marked 2 this is the right syntax.)

MartinPacker commented 4 years ago

Likewise text output. Will now do README.md and then merge.

cclauss commented 4 years ago

I just submitted a minor change to README.md

MartinPacker commented 4 years ago

Ah. I wonder what that did to my attempt to merge your pull request.