I have a TW where some tiddlers are also tags. They tags themselves and a 
bunch of other tags.

For each of those tags, I want to tell how many tiddlers tag them and make 
a list of them which would look like that if I do it manually (the case as 
of now):

!!! [[foo tiddler]]
{{foo tiddler}}

!!! [[bar tidller]]
{{bar tiddler}}

(the link allow me to edit them, but I want to see their contents on my 
page.)

As for the number of tiddlers, I have done this macro:
\define counting()
<$set name="qty" filter="[all[current]tagging[]butfirst[]count[]]">
<$set name="label" 
filter="[all[current]tagging[]butfirst[]count[]compare:number:gt:[1]then[tests]else[test]]">
<<qty>> <<label>>
</$set></$set>
\end

which I used like this, simply:

<<counting>>

and I get something like "42 tests" or "1 test". (the tagging tiddlers are 
describing tests).

the problem in my macro "counting" is that I am duplicating code to get the 
tiddlers and count them. I have tried with auxilliary variable or macro, 
but I was unable to get it work.

Also, the work to get the tiddlers would also be of use for generating my 
list. As for this one, I would need a "map" filter and a "reduce" or "join" 
filter to achieve my goal. But these do not exist. And with the tools 
available, I can get my list of tiddlers, and use strings filter operator 
to make something ot of it. I've read that I would need special attention 
as I want to output tiddlywiki code to be interpreted by TW instead of 
basic texts, but for the time being, just outputing the tw code would be so 
sweet!

If the current tiddler in my filter generated list of tiddlers is "fubar", 
I can easily transform it in "!!! [[fubar]]" or "{{fubar}}" but I am unable 
to get "!!! [[fubar]]\n{{fubar}}" because I can't duplicate "fubar" or 
don't know how to. An other possibility would be a sprintf-like filter or 
macro.


-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/564224f0-23da-44a2-9050-92ecdc3c8978n%40googlegroups.com.

Reply via email to