First identify the titles of missing tiddlers then for each search for that title in all tiddlers, list or count.
This may also detect matching text that does not form a tiddler title but that can be useful as well.
The Freelinks plugin could also help combined with search.
<$list filter="[all[missing]] -[[New Tiddler]]" variable=missing-title><h2><$link to=<<missing-title>>/> <$count filter="[all[]search:text<missing-title>]"/></h2> <$list filter="[all[]search:text<missing-title>]">
</$list></$list>
<$list filter="[all[missing]sort[]] -[[New Tiddler]]" variable=missing-title>
<h2><$link to=<<missing-title>>/> <$count filter="[all[]search:text<missing-title>]"/></h2>
<$list filter="[all[]search:text<missing-title>]">
</$list>
</$list>
The next step is to sort the list if you need to but since the sort order is a value we determine from our search its not so strait forward
return renderList(tiddlerData);
return renderTable(tiddlerData);
so after playing around with filter operators and trying to find a way over a data tiddler I wrote a javascript macro I attatched below.The only caveat with this is that you have to close and reopen the tiddler calling the macro due to how javascript macros are called. Maybe someone has an idea for how to reload a single tiddler.
\define getData()<$list filter="[all[missing]!has[draft.of]sort[title]]"> <$text text="[["/>{{{ [<currentTiddler>backlinks[]count[]divide[1000]removeprefix[0.]] }}};<<currentTiddler>><$text text="]]"/><br></$list>\end
\define renderTable()<table><tr><th>Missing</th><th>Times Referenced</th></tr><$list filter="[enlist<missing>!sort[]]"> <tr> <td>{{{ [<currentTiddler>split[;]rest[]join[;]] }}}</td> <td style="text-align:right;"><$text text={{{ [<currentTiddler>split[;]first[]divide[1]] }}}/></td> </tr></$list></table>\end
\define renderList()<ul><$list filter="[enlist<missing>!sort[]]"> <li> {{{ [<currentTiddler>split[;]rest[]join[;]] }}} (<$text text={{{ [<currentTiddler>split[;]first[]divide[1]] }}}/>)</li></$list></ul>\end
<$list filter="[all[missing]limit[1]]" variable="has_missing_tiddlers" emptyMessage="<p>No Missing Tiddlers</p>"> <$wikify name="missing" text=<<getData>>> <<renderList>> </$wikify></$list>
* the outermost $list checks that there are missing tiddlesr and displays either "No Missing Tiddlers", or proceed to get the list of missing tiddlers and show the output
* the outermost $list checks that there are missing tiddlesr and displays either "No Missing Tiddlers", or proceed to get the list of missing tiddlers and show the output
Thank you Hans for asking and Eric for answering.
This solves a problem I had so far regarded as unsolvable.
Pit.W
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/601789af-b470-4a5b-a3fb-10b8afeecdc2n%40googlegroups.com.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de
Thank you Hans for asking and Eric for answering.
This solves a problem I had so far regarded as unsolvable.
<<localvar "varname" "filter">>