Sort lines in a note based on each line’s tag

What I’m trying to do

I want to create a list of ideas, and add a tag for each line (idea). Before I begin doing this, I am trying to figure out a way to sort the lines of ideas based on their tag (possibly using nested tags). While I am curious about a way of doing this via Dataview, I am more interested in actually having the text arranged within the note. The list will only have one level, with no indented sub-ideas.

I am also interested in alternative workflows that could accomplish something similar. For example, each time I write a line, I could extract it into a note based on the category. Then I could assemble the resulting notes as one. However, using the suggester for notes wouldn’t be limited to my categories in the way that tags could be. That being said, I suppose I could create a separate vault.

Things I have tried

I have never really tried using this workflow before, so I haven’t tried much other than doing some searches here and elsewhere. I imagine it is not an easy feat to accomplish this with a python script, but it seems very much possible.

Thank you.

My workflow is a bit different.
I want to take the job of adding tags off of my shoulders.
I have free-flowing (long-form type of) content interspersed with bits of outliner type of content. Generally longform.

I make AI to go through the note content and based on the context, select the HEAD or main idea of the note and generate plantUML diagram nodes connected to each other and the main idea (main idea is a rectangle, the rest are cards).
Then when I paste the diagram into the note, I cut it into my clipboard, and paste it back into the note with a “Paste Army Knife” script that parses the diagram’s nodes and adds these to a plantuml_nodes property.
I can then query that property in the Search Modal or Dataview/Datacore.

If you carry out a query after 20-50 of these have been done, there might be some nodes of the diagram that will overlap.

I understand this sounds like a lot of work, especially when we have Global Graph, etc. But:

  • Global Graph tends to be messy with many notes (Local Graph is only good for current note)
  • I don’t need to push myself to assign tags this way
  • It’s just a case of some setup and a few clicks and maybe in a year’s time, one can see something

Mind you, I have just given a general view of this, as my use case is much more specific and I didn’t want to go into specifics.
Also, this will probably work well if your note content is congruent around one main topic.
But you can experient or take this further.

Note: I keep the diagrams for my use case. If I didn’t, I wouldn’t have needed to parse diagrams’ nodes, etc. For me, the diagrams are top priority, the node properties being able to be queried just secondary, but it is helpful for me to look for diagrams with a specific topic, based on the nodes.

1 Like

@Yurcee I really appreciate this. If you don’t mind, that would be so helpful if you could further explain more specifics about the exact steps you take in order to use ai, as well as the details of the script. I know it’s a lot to ask, and you’ve already explained so much, but this sounds like exactly what I could use to do what I’m trying to do. I’ve been at this a long, long time, and do agree with your assessment about the usefulness of some of the other options and the importance of the diagram. Thanks very much! No pressure.

I suppose it’s possible I could make this into some low-profile post at Share & showcase and then link it here…?

Just would need to make various modifications in 3-4 places.

I would also need to think about how to ‘sell’ what would ostensibly look like an overkill to do for those who are accustomed to tagging stuff and being done with it.

You see my motivation for the workflow was something else. Now I need to reverse the priorities to sell something that I didn’t have motivation for originally…

Would this still come out right…? That’s what I’m trying to wrap my head around at 2 a.m. here (2-3 hrs before the first F1 race of the season… :slight_smile: )

Because auto-tagging with AI is pretty prevalent now and is the plantUML diagram going to be the main selling point here…or what?
I distinctly didn’t want auto-tagging as my text is already peppered with cue words AI creates the diagram of, but will your notes qualify or are they diagram-worthy, so to speak…?

1 Like

Here goes:

Enjoy

P.S.
You job will be to customize the dictionary of the prompt to standardize the output in such a way to get back what you want, otherwise the nodes will be too wayward, meaning the whol thing would not amount to anything better than a simple search, otherwise! You know what I mean.

1 Like