Filter lists by tags and exclude tiddler with specific tags.

1,886 views
Skip to first unread message

Mammut

unread,
Mar 6, 2009, 11:53:13 AM3/6/09
to TiddlyWiki
Hi @ all,

I searched a lot and red many discussions, but couldnt find a suitable
answer.
Maybe someone can help me or delegate me to an already existing
helpful thread.

I try to create a list (in a tiddler) which is filtered by tags.
Finally the list should contain all existing tiddlers exclude tiddler
by one or more defined tags.

For example:
<<list filter [tag[ALL]] [!tag[systemConfig]] [!tag[[admin]]>>


Info - I found and checked already:
1. http://lewcid.org/2007/10/23/how-to-list-tiddlers-by-tags-the-filter-tipped-way/
2. Thread: List filter & multi-word tags

thanks a lot for any advice, thread, solution, ...

regards
mammut

Eric Shulman

unread,
Mar 6, 2009, 12:13:22 PM3/6/09
to TiddlyWiki
> I try to create a list (in a tiddler) which is filtered by tags.
> Finally the list should contain all existing tiddlers exclude tiddler
> by one or more defined tags.
>
> For example:
> <<list filter [tag[ALL]] [!tag[systemConfig]] [!tag[[admin]]>>

Try this plugin:
http://www.TiddlyTools.com/#MatchTagsPlugin

It extends the core's filterTiddlers() function so you can create
complex tag matching criteria using *boolean operators* ('and', 'or',
'not', plus nested parentheses if needed) as well as *regular
expressions* (to match 'wildcard' or other patterned tag values).

Using your example from above, you could write:

<<list filter [tag[not(systemConfig or admin)]]>>

Note: for shorter notation, you can use "&&" for AND, "||" for OR and
"!" for NOT, like this:

<<list filter [tag[!(systemConfig||admin)]]>>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Mammut

unread,
Mar 6, 2009, 12:33:29 PM3/6/09
to TiddlyWiki
Thanks a lot Eric, you´re great!

Just a short addition for all with same problem/desire ...
add '' '' to finish the statement finally

Example:
<<list filter "[tag[not(systemConfig or admin)]]">>


Thanks!
Mammut

Eric Shulman

unread,
Mar 6, 2009, 2:11:24 PM3/6/09
to TiddlyWiki
> Just a short addition for all with same problem/desire ...
> add '' '' to finish the statement finally

> <<list filter "[tag[not(systemConfig or admin)]]">>

oops! You are absolutely right. The boolean tag matching contains
spaces, so it has to be surrounded by quotes in order for the macro to
treat it as a single parameter.

-e

Eric Weir

unread,
Mar 6, 2009, 3:02:41 PM3/6/09
to Tiddl...@googlegroups.com

On Mar 6, 2009, at 12:13 PM, Eric Shulman wrote:

>> I try to create a list (in a tiddler) which is filtered by tags.
>> Finally the list should contain all existing tiddlers exclude tiddler
>> by one or more defined tags.
>>
>> For example:
>> <<list filter [tag[ALL]] [!tag[systemConfig]] [!tag[[admin]]>>
>
> Try this plugin:
> http://www.TiddlyTools.com/#MatchTagsPlugin

Thanks, Eric. I was just going to ask for help with this myself. [It
would be nice if there were such synchronicities every time I want
help with something.]

Sincerely,
----------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

Reply all
Reply to author
Forward
0 new messages