this is all fabulously useful and super cool, thank you, everybody!!!

On Tuesday, July 28, 2020 at 3:02:12 AM UTC-4, bimlas wrote:
>
> Not a perfect solution, but you can relatively easily create tables in the 
> Javascript console that you can sort by columns by clicking on the header.
>
> *SAVE YOUR WIKI BEFORE TRYING OUT*: Although it is just a query and does 
> not change anything, it is better to prevent trouble.
>
> Open the DeveloperTools console in the wiki window (right click anywhere 
> on the page -> inspect element -> console tab) and issue this command:
>
> let results = [];
> $tw.utils.each($tw.wiki.getMissingTitles(), (tiddler) => {
>   const backlinks = $tw.wiki.getTiddlerBacklinks(tiddler).length;
>
>   results.push([
>     tiddler,
>     backlinks
>   ]);
> });
> console.table(results);
>
> In another example, we can print a list of tiddlers, which can be sorted 
> by the number of links and backlinks:
>
> let results = [];
> $tw.wiki.forEachTiddler((tiddler) => {
>   const links = $tw.wiki.getTiddlerLinks(tiddler).length;
>   const backlinks = $tw.wiki.getTiddlerBacklinks(tiddler).length;
>
>   // Filter unnecessary results
>   if(links === 0 && backlinks === 0) return;
>
>   results.push([
>     tiddler,
>     links,
>     backlinks
>   ]);
> });
> console.table(results);
>
> Because the table can display up to 1000 rows, it's a good idea to filter 
> out irrelevant results (such as those with no links and backlinks).
>

-- 
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/b46188a1-4fc2-48cf-8010-fd4f0a5f248fo%40googlegroups.com.

Reply via email to