Assuming that you have a well-structured tree (nothing to cause
eternal loops), then this script (using Inline javascript plugin)
should do it. I think you can see where to plug in the tag name.

Mark

<script label="Count Tiddlers">
var tagName = "Personal" ;

function recurCount(tagName) {
  var tiddlers=store.getTaggedTiddlers(tagName) ;
  var tidCount = 1 ;
  for(var i=0;i<tiddlers.length;i++) {
    var title = tiddlers[i].title ;
    tidCount += recurCount(title) ;

  }
  return tidCount ;
} // recurCount()

var cnt = recurCount(tagName) ;
alert("Count was " + cnt + " for "+tagName) ;

</script>


On Apr 9, 3:53 am, twgrp <[email protected]> wrote:
> Can't find this in archives or in e.g the many forEachTiddler examples
> [1].
>
> The idea is to get a list over tags ranked by "domain size".
> I.e for a certain tag, how many tiddlers are tagged with it (let's say
> it's 3) plus the number of tiddlers tagged with the names of *those* 3
> tiddlers (let's say it's 15)... plus how many tiddlers are tagged with
> those 15 tiddlers... plus... well you get it.
> The end result for that particular tag is then 3+15+... = TagDomain
> size
>
> The purpose is to see what tags that "are important topics" in the TW.
>
> I've found many variants[2] ranking by how many tiddlers that are
> *directly* tagged with a certain tag, but this is a bit misleading
> here, like the tip of an ice berg. I think what is needed is some kind
> of tree traversing, counting leafs. I think the tag/tiddler-names must
> be stored and continually compared, or it would probably turn
> circular.
>
> Any help appreciated! Thank you!
>
> :-)
>
> [1]http://tiddlywiki.abego-software.de/#ForEachTiddlerExamples
>
> [2] for example:
> * the built-in Tags listing, in the sidebar tabs
> *http://tiddlywiki.abego-software.de/#[[List%20all%20Tiddlers%2C%20grouped%20by%20Tags]]
> *http://www.tiddlytools.com/#RelatedTiddlersPlugin
> *http://www.tiddlytools.com/#TagCloudPlugin
> *http://www.tiddlytools.com/#TagGridPluginInfo

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to