subfilter examples

123 views
Skip to first unread message

Mohammad

unread,
Jan 4, 2019, 5:42:40 AM1/4/19
to TiddlyWiki
In TW release 5.1.18, the new operator subfilter has been introduced. I am looking for some examples to show the application of this
new subfilter in action. There are two examples here but I did not understand where and how they should be used.

I would appreciate if you can give me some references if any or give few examples here



--Mohammad

TonyM

unread,
Jan 4, 2019, 5:57:23 AM1/4/19
to TiddlyWiki

Mohammad

unread,
Jan 4, 2019, 6:00:49 AM1/4/19
to tiddl...@googlegroups.com
Thanks Tony,

I am reading what you references. BUT
 
If we have a filter and then a subfilter, does it means we add new filter to previous one? I mean does this subfilter is something separate or will be AND to the main filter?

--Mohammad

TonyM

unread,
Jan 4, 2019, 7:00:32 AM1/4/19
to TiddlyWiki
Mohammad,

The "main filter" could be the only part of the filter. What is Shure is my examples all work. Some more detailed analysys may be nessasary but I think each is a "run"

Regards
Tony

Riz

unread,
Jan 5, 2019, 7:25:20 AM1/5/19
to TiddlyWiki
Imagine you want to dynamically create filters. You can obviously use macro definitions and use them like

filter=<<mymacro>>

Issue arises when you want to add steps to the filter. You cannot go
filter="<<mymacro>> +[tag[mytag]]"

Subfilter solves this issue. You can go like
filter="[subfilter<mymacro>] +[tag[mytag]]"
And in another tiddler you can go like
filter="[subfilter<mymacro>append[!]]"


Basically it enables you to define dynamic filters and reuse them.


sincerely,
Riz

https://ibnishak.github.io/Timimi/

TonyM

unread,
Jan 5, 2019, 5:35:23 PM1/5/19
to TiddlyWiki
Mohammad,

As far as I can see In the filter where you use the subfilter you decide if there is a space or not between other filter operators and your subfilter. This influences how the subfilter is applied.

Need confirmation
tony

Mohammad

unread,
Jan 7, 2019, 2:25:51 PM1/7/19
to TiddlyWiki
Many thanks Riz.

Cheers
Mohammad

Mohammad

unread,
Jan 7, 2019, 2:26:47 PM1/7/19
to TiddlyWiki
Thanks Tony!
 I am practicing to learn it. Riz gave a very good example of course.

Cheers
Mohammad
Reply all
Reply to author
Forward
0 new messages