Felicia,

Since you a quite able to build Javascript solutions into Tiddlywiki now, I 
would like to ask a quick question, if it makes sense to you.

Would you know how to define a global variable(s) that we can update 
(repeatedly) via a macro call? As a result it will need to have a step to 
initialise it.

Imagine that inside a list widget someone could conditionally change the 
variable, ie add 1 to a number or set a flag = yes, such that the value can 
be accessed outside of the list widget?

This is a missing mechanism as far as I can see.

Regared
TW Tones




On Friday, July 24, 2020 at 8:34:52 PM UTC+10, Felicia Crow wrote:
>
> Hi,
> 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.
>
> For now the macro - called simply with <<missing-tiddlers>> - renders as a 
> list of all missing tiddlers sorted by how often they are referenced:
>
> [image: missingTiddlersList.png]
> It can be changed to render as a table by changing this line of code in 
> the macro:
> return renderList(tiddlerData);
>
> To this:
> return renderTable(tiddlerData);
>
> Which then looks like this:
>
> [image: missingTiddlersTable.png]
>
> Please be aware that after importing the macro/changing it you have to 
> reload your wiki for it to take effect.
>
> Also as an aside unlike Tony's solution this uses the backlink filter 
> operator so it only counts hard links and excludes system tiddlers 
> completely. A little more about what hard and soft links are here 
> <https://tiddlywiki.com/#Hard%20and%20Soft%20Links>.
> The reason I did this is mostly to ensure that these are actual references 
> and not just the tiddler title being in the text even if it isn't meant as 
> an actual reference.
> Should you want to use Tony's solution with search instead of backlinks it 
> is easy change the filter either by yourself or I can update the macro.
>
> Regards,
> Felicia
>
> On Thursday, 23 July 2020 23:05:56 UTC+2, Beckstrom wrote:
>>
>> Is there a way to generate a list of missing tiddlers sorted by the 
>> number of times they have been referenced?
>>
>> Right now I have a hundred or so "missing tiddlers," and I'd guess most 
>> of them are only referenced from other tiddlers once or twice - but there 
>> are probably a handful that are referenced many times. I like to 
>> periodically clean up and add things to my wiki, and knowing which tiddlers 
>> are most needed would be cool.
>>
>> thanks in advance!
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5f77f422-b293-4a4c-a600-c75b1a507f9bo%40googlegroups.com.

Reply via email to