Display all tiddlers sorted by size from largest

Hi, please, is there some way to display table of all tiddlers sorted by size from largest first? I didnt find field with size of tiddlers for sorting list or table of tiddlers. But I mean that field must exists, because for example PluginSize plugin displays sizes of plugins.

Any suggestion?

That field does not exist. But just the other day, this thread was posted which you can probably use:

https://talk.tiddlywiki.org/t/a-kiss-template-to-calculate-the-size-of-tiddlers-and-plugins

Try this:
https://tiddlytools.com/#TiddlyTools%2FSearch%2FFilters

  • Enter or select a filter to get a list of tiddlers
  • Then, from the “sort by” droplist, select “size - large to small”

TiddlyTools/Search/Filters uses the following macro to calculate the size of each tiddler in the list:

\define filters_size()
[<currentTiddler>fields[]]
:map[<..currentTiddler>get<currentTiddler>else[]length[]]
[<currentTiddler>fields[]length[]]
+[sum[]]
\end

Notes:

  • <currentTiddler>fields[] gets the names of all the fields in the current tiddler
  • :map[...] gets the length of each field value
  • <currentTiddler>fields[]length[] gets the length of each field name
  • +[sum[]] totals all the individual lengths to give the total size of the current tiddler

To get the total size of the entire set of tiddlers, use

{{{ [subfilter<filt>] :map[subfilter<filters_size>] +[sum[]] }}}

Notes:

  • <filt> is a variable containing the filter syntax you used to find the set of tiddler titles
  • :map[...] applies the previous filters_size filter to get the size of each tiddler
  • +sum[]] totals up all the individual tiddler sizes

enjoy,
-e

4 Likes