Zettelkasten Forum

[FEATURE REQUEST] Outliner view of a zettel and its children

edited June 2019 in The Archive

After thinking about zkviz and my workflow, I realised that one feature would be particularly useful or me: the ability to have an outline view showing all the "children" of a chosen zettel ("children" just meaning the zettels that the chosen zettel links to), and optionally their children as well, and their children, and so on – preferably in the current note list.

Maybe this could be implemented by a specific command in the search bar like "outline(Zettel-ID)(depth=3)" or something similar, which would then result in a note-list where children are indented (ideally with an option to fold/unfold individual children lists).

For now, I would be quite happy with just the first part: Having a command that results in a list of the chosen zettel, its children, their children and so forth. I could then copy and paste this list into my outliner software (OmniOutliner), indent zettels according to their children relations there and then freely move them around. Would that be easy to implement @ctietze?


  • This particular outlining feature is not on my task list, but I do think the upcoming scriptability milestone will enable us all to figure out how to script stuff like this. The functionality The Archive will expose can change in the process, and we'll have to be careful to not bloat the app.

    Maybe a functionality to return a list of links for any given note would be all you need: then the script can start with currentNote, request all links and get linkList1; then for each item in linkList1 request all links again, etc. for as many levels as you want. Does The Archive need to supply this functionality, or are we all better off if the scripts implement their own link finding process? We'll see!

    Author at Zettelkasten.de • https://christiantietze.de/

  • @ctietze: That sounds good and sensible – looking forward to the Scriptability-feature!

  • edited September 2019

    I solved this problem with a (quite long) KM macro. It will ask for the desired level up to which you want the children to be shown and then depending on your choice either produce a note that shows the children-hierarchy of a selected zettel in The Archive or in OmniOutliner (the latter allows to fold and unfold). I won't post an image of the macro here because it is quite long and the user case is very special, but anyone who is interested can download it here. For the gsed command in it to work, you need to install GNU-sed (e.g. with brew install gnu-sed). You possibly also need to create the variable ENV_PATH in Keyboard Maestro's Preferences -> Variables and set it to /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.

    The output looks like this if you choose to display it with The Archive:

    And like this if displayed with OmniOutliner:

  • That is a very nice-looking result, @Vinho! Congrats! :) Hope writing this stuff will get much easier when the scripting API is implemented.

    Author at Zettelkasten.de • https://christiantietze.de/

  • @ctietze: I don't really know what that means or will be like, but am still very much looking forward to it ;)

Sign In or Register to comment.