Filter to show Tiddlers who just have the tag notes (and no other one).

66 views
Skip to first unread message

Jan

unread,
Jul 6, 2019, 6:00:22 PM7/6/19
to tiddlyWiki
Hello,
I do not know, wheter the question is too simple, but I have tried some
time to find the answer:
Is there a filter to show Tiddlers who just have the tag "notes" and
omit those tagged with other tags aside "notes"?

Thanks for your help!
Jan

Mark S.

unread,
Jul 6, 2019, 6:19:18 PM7/6/19
to TiddlyWiki
Here's an example using "HelloThere" on tiddlywiki.com :

<$list filter="[tag[HelloThere]]-[tag[HelloThere]tags[]!field:title[HelloThere]tagging[]]">

</$list>

bimlas

unread,
Jul 6, 2019, 6:30:17 PM7/6/19
to TiddlyWiki
Jan,

This lists all tiddlers with only one tag:

<$list filter="[has[tags]]">
  <$set name="currentTags" filter="[all[current]tags[]]">
    <$reveal type="match" default="1" text={{{ [enlist
<currentTags>count[]] }}}>


      <$link to=<
<currentTiddler>>><$view field="title"/></$link>: <$list filter="[enlist<currentTags>]"><<tag>></$list>


    </$reveal>
  </$set>
</$list>

If you are looking for tiddlers having only a particular tag:

<$list filter="[regexp:tags[^notes$]]">

</$list>

Jan

unread,
Jul 7, 2019, 5:16:32 AM7/7/19
to tiddl...@googlegroups.com
Hello Mark, hello Lazlo.
Thanks a lot! It is great to wake up and find a solution for your Problem in the Mailbox.
I chose Lazlo's solution becaus it is so short and elegant. I guess I will have to learn regex!

Best wishes Jan
--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/20c0ec6d-e94e-47bd-8563-755edaf84bb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bimlas

unread,
Jul 7, 2019, 2:57:36 PM7/7/19
to TiddlyWiki
Jan,

While regex is a powerful tool, you shouldn't depend on it in TiddlyWiki. Learn filters, macros, etc. It was an edge case, where regex had advanteges, but most of the time you don't need to use on fields. Use it for text search or special cases where it would be too complex to use other filters (like this), but firstly you should use "dedicated" filters and macros.

TonyM

unread,
Jul 7, 2019, 6:16:48 PM7/7/19
to TiddlyWiki
I just wanted to drop the idea that to meet the original request of tagged by only one tag, you can compare the result of the filter operators with the content of {{!!tags}}. In this case if tagged more but -[{!!tags}]

I will share the code version later.

Tony

Reply all
Reply to author
Forward
0 new messages