TiddlyMap can help you see the link and build a map to illustrate that connection. Play with the step distance settings to adjust. It’s under the Eye Icon.
So are you trying to, for instance, find all paths from a
to e
? Do you know that you have an acyclic graph (that is, do you know that there are no loops?) If not, how would you want to deal with any loops? And are you linking through tags
, through another field, or through links in the text
field? Some other way? And what does your expected output look like?
It seems that this is a graph theory search feature based on tiddlywiki, and the situation I have encountered so far is the situation in which the photos I mentioned above appear
Probably, but there are reasonable techniques to handle such, or we can create them.
As far as I can tell, this is the first mention of photos. How are they linked? Via tags? Another field? Something else?
could you perhaps tell us the exact outcome you want to see for the example you have provided
are you looking for some kind of filter that can give you a list of tiddlers linked together in a hierarchy? , Ancestors and descendants filter operators or
Release: Improved performance of Kin filter
otherwise i am bit confused as to what you want to achieve?
I am confident there are a number of ways to achieve what you are asking. I have explored building network databases, representing communications networks, and looking for the critical path, not to mention hierarchical lists and tree walking.
- I also actively pursue methods to overcome any apparent issues with these kinds of issues in tiddlywiki.
If you could provide test data, a demo wiki or an example using existing data on tiddlywiki.com we could give you much better answers.
Try and explain your data and desired results, not the code you think will help.
So I can say that one of the paths from tiddlywiki to macros is shown in the above photos
I think we understand how your input works. But what are you looking for for output? Do you want a graph like what TiddlyMaps draws? Do you want something like what I earlier proposed for breadcrumbs?:
OnePath.json (983 Bytes)
Are you simply looking to collect the data, and if so, what’s the output format? I wrote a JS implementation to collect this information as an array of arrays of tiddler names, but that format isn’t so useful in TW. (It’s also based on tags, not links, but that’s an easy switch.) And it collected all paths from certain root nodes
One other concern: any realistic techniques to do this through links are going to have to deal with the fact that only hard links are readily available to work with.
Thank you very much for providing the functional code,I want to see the possible knowledge correlation between different items, so that when I learn new knowledge at the midpoint between two or more notes I have recorded, it is easier for me to quickly organize the network of notes, and quickly approach the new knowledge to be learned from all directions, so that learning a new knowledge has structure and logic
You still haven’t demonstrated the output format you’re looking for.
How do I retrieve all associated (double-chained) paths that exist between two arbitrary tiddlers by double-linking
I assume you don’t want a pointer to the entire wiki, which already includes all that information. So what sort of output do you actually want?
It looks something like this, except where the abc corresponds, is all the possible ways that the knowledge path I’m going to traverse from start to finish
The format is likely to be real-time, just like looking up Google, probably not many people will export their website search history to the local bar
I’m sorry, I still make no sense out of this. Do you want to somehow highlight tiddlers (do you have to open them first?) if they happen to fall on one path between, say, HelloThere
and Macro Calls in WikiText
? What if there are three paths? Or thirty?
Returns every link path that can lead to each other, all of them, such as two tiddlers with an average distance of 100 links between them, and 100 connecting paths between them
Such as:
“a->b->c”;
“a->c”;
… ;
… ;
… ;
Then the code I shared above is a very good start. It would have to be updated for links versus tabs, and both inputs would be the full list of all (non-system?) tiddlers.
We can do this for a small list (update: fixed this link!) very easily. But that list has 11 entries with an average number of links of 1.18. That yields 44 paths. If we were to try this on tiddlywiki.com with its 1621 non-system/non-shadow tiddlers with an average number of links of 2.12, I’m guessing it would yield, at a minimum, tens of millions of paths.
If you wanted to select a start tiddler, an end tiddler, or both, this seems feasible. But listing all paths for any medium to large wiki seems unlikely. And it would get tremendously worse if we tried to deal with soft links as well.
A good example already built into tiddlywiki is the Table of Contents, see tiddlywiki.com. This starts are the tiddler TableOfContents and follows all tiddlers that use the current tiddler as a tag.
- This is a hierarchical structure based on tags.
If you are going to automate this as in the chain of links you followed from HelloThere > TiddlyWiki > WikiText > Markdown > Macros are only a very small subset of links and paths available.
- Note these links may or may not be in the table of contents, they come from the content of each tiddler you visit.
What I think you want is an equivalent to the TOC based on tags, but for links displayed in each tiddler?
- Is this correct ?
For example;
- TiddlyWiki >
- Philosophy of Tiddlers
- Creating and editing tiddlers
- Structuring TiddlyWiki
- Sharing your tiddlers with others
- TaskManagementExample
- “TiddlyWiki for Scholars” by Alberto Molina
- Future Proof
- 中文社区 - Chinese Community
Nice, this is one step closer to the ultimate goal, it can list all the double-linked links under the current note, maybe it is not practical to traverse all the paths of the knowledge base in pure wiki syntax, but we can export an index list of the outbound links of each tiddlers, and maybe use python to do a deep walkthrough
I created a tiddler that uses the current wiki to generate JS code you can paste into a JS environment (Node.js, the browser console, some online REPL [such as the one I use], or wherever.)
Download this link: Build List.json (1.3 KB), import it into your wiki, copy the JS code it renders, and run it in some JS environment. Note that almost certainly the number of tiddlers on tiddlywiki.com, especially with the number of links per tiddler, will almost certainly be too large to run in any reasonable amount of time.
For example, I chose, mostly randomly, the wiki https://maths.tiddlyhost.com/, which has 148 regular tiddlers with around 0.37 links each. I dragged that tiddler onto the wiki, imported it, copied the resulting code onto a REPL, and in the output received 464 paths:
"Bit-square theorem → Nonstandard Analysis";
"Bit-square theorem → Nonstandard Analysis → First fundamental theorem";
"Bit-square theorem → Nonstandard Analysis → Fundamental theorem of set theory";
"Bit-square theorem → Nonstandard Analysis → Linear Programming";
"Bit-square theorem → Nonstandard Analysis → Linear Programming → Set Theory";
"Bit-square theorem → Nonstandard Analysis → Linear Programming → Topology";
"Bit-square theorem → Nonstandard Analysis → Linear Programming → Topology → Set Theory";
...
"Theoretical Informatics → Set Theory → Nonstandard Analysis → Topology";
"Topology → Set Theory";
"Topology → Set Theory → Nonstandard Analysis";
"Topology → Set Theory → Nonstandard Analysis → First fundamental theorem";
"Topology → Set Theory → Nonstandard Analysis → Fundamental theorem of set theory";
"Topology → Set Theory → Nonstandard Analysis → Linear Programming";
"Topology → Set Theory → Nonstandard Analysis → Number Theory";
"Topology → Set Theory → Nonstandard Analysis → Second fundamental theorem";
(Note that I added spaces around the arrows, because it looks better to me. You can remove them in the last line of that tiddler’s source code.)
If this looks useful, we can investigate how to turn it into a widget/macro/procedure you can use to show these directly on your wiki.