Not tagged

4 views
Skip to first unread message

Morris Gray

unread,
Sep 10, 2008, 9:05:08 PM9/10/08
to TiddlyWiki
What would be the simplest script (not a forEach script) that would
get me a list of tiddlers 'not' tagged with a particular tag.

Morris

Eric Shulman

unread,
Sep 10, 2008, 9:34:13 PM9/10/08
to TiddlyWiki
> What would be the simplest script (not a forEach script) that would
> get me a list of tiddlers 'not' tagged with a particular tag.

Install
http://www.TiddlyTools.com/#MatchTagsPlugin

Usage:

<<list filter [tag[not someTag]]>>
creates a standard TW bullet item list

<<matchTags "%0" "\n" not someTag>>
creates a custom formatted list

Note that MatchTagsPlugin allows you to use full boolean tag
expressions, including any combination of multiple tags separated by
and/or/not operators with nested parentheses as needed to perform
matching that can be *much* more complex than simply "not SomeTag".

In addition to generating a custom formatted list as inline content,
the <<matchTags>> macro provides several other styles of output for
its results:
<<matchTags popup ...>>
creates a command link that shows a popup list of matches
<<matchTags report ...>>
the macro results are written into a separate [[MatchingTiddlers]]
report tiddler
<<matchTags panel ...>>
a fully-interactive form for entering boolean tag expressions and
generating results on-the-fly.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Morris Gray

unread,
Sep 10, 2008, 11:47:54 PM9/10/08
to TiddlyWiki
Thanks for that Eric. I just updated it in TW Help it has become
standard in my list of required plugins for myself.

The InlineJavascriptPlugin gives such a tremendous capability for its
tiny size of 5514 bytes I would like to use its capabilities at every
opportunity. For example the forEach plugin is 30342 bytes plus the
script, even MatchTagsPlugin is 10238 bytes so they would be a
tremendous overkill for a job of 'list missing tag' script would be
about 500 bytes using a plugin I already have.

Would you mind giving me a little script to do the job?

Morris

Eric Shulman

unread,
Sep 11, 2008, 2:51:07 AM9/11/08
to TiddlyWiki
> tremendous overkill for a job of 'list missing tag' script would be
> about 500 bytes using a plugin I already have.
> Would you mind giving me a little script to do the job?

<script>
var out=[];
var tids=store.getTiddlers("title","tagToExclude");
for (var t=0; t<tids.length; t++)
out.push(String.encodeTiddlyLink(tids[t].title));
return out.join("\n");
</script>

Morris Gray

unread,
Sep 11, 2008, 6:59:22 AM9/11/08
to TiddlyWiki
Terrific, thanks a lot Eric.

Morris
Reply all
Reply to author
Forward
0 new messages