> identifying the largest (or smallest) changecount
> value for the tiddlers within each category and then perhaps appending
> the value to the end of the category
Try this:
---------------
<<forEachTiddler
script '
function getActivity(category) {
var tiddlers = store.getTaggedTiddlers(category);
var changecounts = tiddlers.map(function(itm, i, arr) {
var c = itm.fields.changecount;
console.log(c ? parseInt(c, 10) : 0, itm);
return c ? parseInt(c, 10) : 0;
});
return Math.max.apply(Math, changecounts);
}
'
write 'tiddler.title + " (" + getActivity(tiddler.title) + ")\n"'
>>
---------------
HTH.
-- F.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---