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

Merge as bullets under parent #45

Closed MartinPacker closed 4 years ago

MartinPacker commented 4 years ago

It would be useful to allow promote to actually merge as bullets under parent. (iThoughts CSV node values can be Markdown.)

cclauss commented 4 years ago

Can you please provide an example of what this would look like?

MartinPacker commented 4 years ago

Would look like a single node:


myElement

in the "XML attribute merge" case. (Down from 3 nodes: "myElement", "x=", "y=")

MartinPacker commented 4 years ago

To do this for a node requires the following steps:

  1. Get the node's text i.e. "cell" value.
  2. Get the node's parent.
  3. Append the node's text as a bullet to the parent's text - with appropriate Markdown syntax.
  4. Promote the node's children to be children of the node's parent, at the point this node is.
  5. Delete the node.

This would be repeated for each selected node, their parent node and their children.

Thinking of the syntax to be <match> asbullet

A similar thing could be done for numbered list bullets, though the Markdown is slightly different.

Some of the code replicates what's in CSVTree.promoteLevel - so some abstraction might be possible/desirable.

MartinPacker commented 4 years ago

Implemented in 1.3.