[TW5] textlength[] filter to display size plus title of a tiddler

297 views
Skip to first unread message

wimm

unread,
Jan 12, 2017, 3:14:52 PM1/12/17
to tiddl...@googlegroups.com
New filter/plugin
   With the attached javascript tiddler you can display the text-size of your tiddlers

Use case:
   if you want to find the larger tiddlers in your wike e.g. to reduce some of the larger imported images (images are stored in the text field)

Example
   to display the 25 non system tiddlers in your wiki sorted on size in descending order (largest first).
  {{{[all[tiddlers]!is[system]textlength[]!sort[]limit[25]]}}}

For tiddlywiki.com (5.1.13) this looks like


* To use the filter you must first import the attached json tiddler. Drag the file $--plugin-wimmoermans-filter-textlength.js.json to the sidebare of your tw (until green import header appears) then drop, import the tiddler, save your tw, and (re)load the saved tw file.

* To uninstall the textlength filter: Open the tiddler $:/plugin/wimmoermans/filter/textlength.js then press the delete icon. press ok.
* You can also import the example tiddler list 25 largest tiddlers wimm.json.

Please note : 

1) The displayed links are all in italics because there are no tiddlers present ith a name consisting of 6 digits + space + title.  
    Alternatively use the follwing it will display text instead of links:

   <$list filter="[all[tiddlers]textlength[]!sort[]limit[25]]">
   <$view field="title"/><br>

   </$list>

2) To find the real tiddler, copy the name part to the (advanced)search field and click on the link from the search results.

3) The size only displays the length of text field (tiddler body), it does not include any of the other standard or custom fields.

Njoy
Wimm
$--plugin-wimmoermans-filter-textlength.js.json
list 25 largest tiddlers wimm.json

wimm

unread,
Jan 27, 2017, 9:13:31 AM1/27/17
to TiddlyWiki
to view a charactercount of the two most recent modified tiddlers (including the current drafts)
create a tiddler with the following text

{{{[all[tiddlers]!is[system]!sort[modified]textlength[]limit[2]]}}}
 



wimm

unread,
Jan 27, 2017, 2:46:39 PM1/27/17
to tiddl...@googlegroups.com
above tiddler as a tab in the sidebar called charcount (drag drop json file to your wiki)

number of characters is shown when tiddler is in edit mode or not;-)
charcount sidebar.json
Reply all
Reply to author
Forward
0 new messages