I'm thinking of a 2-step process. In step 1, you calculate the size of the text field and put it in a field (e.g. size).
Then step 2 you simply sort numerically by the size field. So how to get the count? You can use the regexps string I presented in another thread to globally split the entire text field character-by-character. Use the count filter operator to count the resulting size. Use action-setfield to save the resulting value. This entire process is called in an outer <$list> for each of the items you want to include in your sort. It's lazy of me not to try all this, but I know you can write the TW-code faster than I can ;-) HTH Mark On Monday, September 11, 2017 at 4:15:11 PM UTC-7, Mat wrote: > > Summary: I'd like to *sort my tids by size* and am wondering if anyone > has a solution for this? > > Longer: > > I'm in the process of converting my main TWC with thousands of tiddlers > into TW5, and it struck me as a good opportunity for cleaning. > > To make the most out of this, I'd like to sort my tids by size. The ideal > would be to know the *byte size per full tiddler*, but I guess *character > count per tiddlers text-field* is pretty close. > > Any ideas? > > ------------------------------------------ > > Note: I found Thomas Elmigers EditorCounter > <https://tid.li/tw5/plugins.html#EditorCounter> with which I can get a > count:title listing... > > <$list filter="[tag[Foo]]"> > <$editor-counter tiddler={{!!title}} field=text /> {{!!title}}<br> > </$list> > > ...but it is not sorted. > > Now how to use that count for sorting is really another problem, so I'm > posting a question for that separately. But I still wanted to mention > Thomas' plugin in case someone has an idea how to use it for my problem. > > Thank you. > > <:-) > > > > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/77e717dc-2f9e-4c3b-9ade-0a91e6f5c185%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

