[TW5][Plugin] Announcing TOC Counting

367 views
Skip to first unread message

HC Haase

unread,
Jun 11, 2019, 6:44:22 AM6/11/19
to tiddl...@googlegroups.com
Announcing the TOC Counting plugin!

Today is my birthday so this is my birthday present to you.


Sometimes TW can feel like a black box, I made this plugin to get a better feel of my table of contents / index tiddlers at a glance.


The TOC counting plugin adds a count of child tiddlers to the right of each entry in the TOC(s). No count will be shown if there isn't any child tiddlers (e.g. no 0).


I hope you find it useful.



I don't know if I did this in the most optimal way, I am particular thinking if it has any impact on performance?? (not that I have noticed any). please enlighten me. I have modified the TOC macro and added to this to the view


<$list filter='[tag<currentTiddler>limit[1]]'  variable=null>(<$count filter="[all[current]tagging[]]"/>)</$list>


Mohammad

unread,
Jun 11, 2019, 7:31:30 AM6/11/19
to TiddlyWiki
Happy your birthday!

and thank you for the present!

Cheers
Mohammad


On Tuesday, June 11, 2019 at 3:14:22 PM UTC+4:30, HC Haase wrote:
Announcing the TOC Counting plugin!

Today is my birthday so this is my birthday present to you.

Sometimes TW can feel like a black box, I made this plugin to get a better feel of my table of contents / index tiddlers at a glance.


The TOC counting plugin adds a count of child tiddlers to the right of each entry in the TOC(s). No count will be shown if there isn't any child tiddlers (e.g. no 0).


I hope you find it usefull.

Mat

unread,
Jun 11, 2019, 9:11:42 AM6/11/19
to TiddlyWiki
Happy B-day and thanks for sharing!


<:-)

Julio Peña

unread,
Jun 11, 2019, 1:32:30 PM6/11/19
to TiddlyWiki
Hello HC and all,

Aha HC...veeerry useful piece of work! Many thanks for the share.
Have a wonderful birthday; wishing you longevity and health.

Best regards,

Julio

On Tuesday, June 11, 2019 at 6:44:22 AM UTC-4, HC Haase wrote:
Announcing the TOC Counting plugin!

Today is my birthday so this is my birthday present to you.

Sometimes TW can feel like a black box, I made this plugin to get a better feel of my table of contents / index tiddlers at a glance.


The TOC counting plugin adds a count of child tiddlers to the right of each entry in the TOC(s). No count will be shown if there isn't any child tiddlers (e.g. no 0).


I hope you find it usefull.

@TiddlyTweeter

unread,
Jun 12, 2019, 6:09:28 AM6/12/19
to TiddlyWiki
Ciao HC Haase

Very simply useful I think.

Lets pretend a use case. You have a large complex structured hierarchy.

Its great how simple "Level One" gets accurate numbers.

What I'm wondering is whether that can be iterated for all sub-levels?

Best wishes
Josiah


On Tuesday, 11 June 2019 12:44:22 UTC+2, HC Haase wrote:
Announcing the TOC Counting plugin!

Today is my birthday so this is my birthday present to you.

Sometimes TW can feel like a black box, I made this plugin to get a better feel of my table of contents / index tiddlers at a glance.


The TOC counting plugin adds a count of child tiddlers to the right of each entry in the TOC(s). No count will be shown if there isn't any child tiddlers (e.g. no 0).


I hope you find it usefull.

David Gifford

unread,
Jun 12, 2019, 6:16:43 AM6/12/19
to TiddlyWiki
I added this to the toolmap. I had to add a new category, "Counting tiddlers". https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=0LNnGpudtrfJybqFdBbkGbwL


On Tuesday, June 11, 2019 at 5:44:22 AM UTC-5, HC Haase wrote:
Announcing the TOC Counting plugin!

Today is my birthday so this is my birthday present to you.

Sometimes TW can feel like a black box, I made this plugin to get a better feel of my table of contents / index tiddlers at a glance.


The TOC counting plugin adds a count of child tiddlers to the right of each entry in the TOC(s). No count will be shown if there isn't any child tiddlers (e.g. no 0).


I hope you find it usefull.

HC Haase

unread,
Jun 21, 2019, 6:25:19 AM6/21/19
to TiddlyWiki


What I'm wondering is whether that can be iterated for all sub-levels?


yes! I wonder that myself. I have it on my to-do. But I for now I must admit I don't have the skills. I haven't figured out the TW filtering. I guess it have to be recursive. I would think that the TOC macro itself is filtering through all sub-levels but I right now I dont know how to use that for counting.

Maybe some TWissards in the group can help :)

HC Haase

unread,
Jun 21, 2019, 6:26:53 AM6/21/19
to TiddlyWiki


onsdag den 12. juni 2019 kl. 12.16.43 UTC+2 skrev David Gifford:
I added this to the toolmap. I had to add a new category, "Counting tiddlers". https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=0LNnGpudtrfJybqFdBbkGbwL


wuuhu... a new category. I have made a mark in TW history

Laurent Bonet

unread,
Jun 22, 2019, 12:18:44 PM6/22/19
to TiddlyWiki

HC Haase

unread,
Feb 14, 2020, 9:58:04 AM2/14/20
to TiddlyWiki
Announcement: TOC counting
Date: 2020/02/14
Release: 2.0.0


I have integrated my TOC counting plugin with bimlas' locator view, so you also can get counts in that TOC.

2.0.0

  • [fix] more sidebar/tags had old and new version. now toggle between two
  • [new] toggle the more sidebar/tags count/no.count
  • [new] added count for bimlas locator plugin
  • [new] added toggle count/no.count for bimlas locator plugin

1.0.0

  • First public version
  • toggle count/no.count for main toc macro
  • add a more sidebar/tags with counts

Magnus

unread,
Feb 14, 2020, 6:01:01 PM2/14/20
to TiddlyWiki
Maybe not a question for You, but how would I go about to apply this counting to the tocP-macro

HC Haase

unread,
Feb 17, 2020, 7:49:23 AM2/17/20
to TiddlyWiki
Announcement: TOC counting
Date: 2020/02/17
Release: 2.1.0

on request of @Magnus I have adde support for the tocP plugin. however it do not work for custom fields.

2.1.0

  • [fix] removed $:/plugins/HCHaase/toc_counting/bimlas/locator/field-templates/link_org from templates in the locator plugin (removed tag)
  • [documentation] clarity: change caption of $:/plugins/HCHaase/toc_counting/bimlas/locator/field-templates/link_count  to Link (with counter)
  • [documentation] clarity: added description field to tiddlers, describing there function
  • [documentation] added reference to the locator plugin settings
  • [new] added count for P Marios tocP plugin. It only works when the parent field is used but not with a custom field (I don't know how to do this).

HC Haase

unread,
Mar 11, 2020, 6:22:11 AM3/11/20
to TiddlyWiki
Announcement: TOC counting v 2.2 Big update
Date: 2020/03/11
Release: 2.2.0


OK this is a big update, I am really satisfied now, except for one issue.

I am happy that

I have implemented what others asked for:
  • integration with bimlas locator plugin
  • integration with P marios tocP plugin

I have done what I wanted in the roadmap
  • added the counting in lists
  • counting of tiddlers in all sub-levels (see warning)

added new cool stuff

  • counting of both tagged and backlinks (toggable)
  • a nicer toggle button in the page toolbar
warning: I am not so happy that
  • when counting all sub-leves with the kin filter it is very slow
  • performance is not great (added toggle off button)
I hope you will enjoy it

2.2.0

  • [new] added counting for all sub-levels of tags (kin- filter). WARNING: this is very slow.
  • [new] added button in page toolbar with 3 modes. 1level count/all level count/turn off
  • [new] added count of links or tag/links (and tag). toggle by pressing the number (3 views)
  • [new] added support for list-links, list-links-draggable and list-tag-draggable
  • [new] moved code to a macro that is used in the plugin, and can be used with the syntax <<toc_counting>> (not used in tocp)
  • [fix] removed counting of 0 zero in the locator and tocp plugins
  • [fix] removed the double "tags" tab form the sidebar. $:/plugins/HCHaase/toc_counting/more/tag_org still had sidebar tag.
Reply all
Reply to author
Forward
0 new messages