Addon/Script Project: Query Node. Bringing queries to Freeplane. #548
Replies: 4 comments 4 replies
-
@eu2021, this works also with other styles also.For example, I use it once to collect all nodes that have scripts in the map. It has also buttons to easy navigate from the selected task in the bucket to the actual node in the map. etc. |
Beta Was this translation helpful? Give feedback.
-
I use this in the Tutorial-o-Matic project.mm map. Later will I add a simplier demo and the scripts |
Beta Was this translation helpful? Give feedback.
-
A good idea, both of you. @eu2021 I think it's the right direction to have the logic executed automatically (in the background). A MapChangeListener would fit the requirements when a node is moved or deleted; a NodeChangeListener for when the target style is assigned to a (new) node. |
Beta Was this translation helpful? Give feedback.
-
@eu2021:
|
Beta Was this translation helpful? Give feedback.
-
scriptDescription: allows creating criteria to have nodes be automatically cloned into another node
Some notetaking programs have a popular feature that is usually called "queries". The idea is: the user defines criteria for the program to transclude itens automatically on a given spot. In FP terms: show the search results (nodes) inside a node that the user chooses.
It's similar to simply filtering, but the user can "embbed" the results into a given place, so it conveniently appears in the proper context.
This video shows how it works in Roam Research.
Now, beyond this "visualizing a search" aspect, there is also an aspect of grabbing the resulting nodes and organizing them in ways that are different from the original place. For example: grabbing all TODO nodes that are around the map and put them on a Kanban board. For my concrete use case, I want to put all the nodes of a given style into a unified Kanban board AND rank the nodes inside the Kanban board, in order of priority:
My usecase: I organize study subjects inside a tree that follows the traditional textbook structure. Inside each subject, there are some categories of nodes that I want to rank in a unified node. For example, questions that I have and need to find answers for (there are so many that I need to actually rank them, so I can prioritize correctly).
Doing this manipulation of the results of the query is also possible on other programs, but it's usually clumsy. But, with this script below, it's easy to do that in Freeplane. Example:
The script is:
So, the 3 variables to be changed are right at the top: the parent node of the branch to be considered; the node that will be the Query Node; the search criteria (in the script below, it's only the Style).
Deleting the original node deletes the node in the Query Node. The check is made every time the script is applied.
I did not find other scripts that do that. If you know any, please show me, so I can learn from it.
Wishlist for future improvements:
Beta Was this translation helpful? Give feedback.
All reactions