The quick version is that I want to propose an extension to the normal 
filter syntax to allow defining variables and have multiple filters in one 
filter string. filters are separated by commas (,) and variables are 
assigned, similar to how the set widget defines them, using ->. One filter 
can be assigned to a variable that is then used in later filters in the 
filter string.

The long version is:

As part of my WikiDB project I needed a way to make more complex filters 
using only one string than you can using tiddlywiki so I added some 
extensions to the filter parser I wrote for the database that may be worth 
considering for the core.
The database is written in Julia so I don't have any demo for this.

The extensions let you define variables and multiple filters in the same 
string.

The string

[tag[a]] -> 1, [tag[b]] -> 2, [tag<1>tag<2>]

Is roughly equivalent to

<$list filter='[tag[a]]' variable=1>
  <$list filter='[tag[b]]' variable=2>
    <$list filter='[tag<1>tag<2>]'>

    </$list>
  </$list>
</$list>


but in my version the output is all concatenated into one list so it could 
be sorted or have the duplicated removed, instead of a bunch of lists 
inside the inner widget.

You could also have multiple filters at the output

[tag[a]] -> 1, [tag[b]] -> 2, [tag<1>tag<2>], [field:foo[bar]]

which is the displayed output from this, but in one list:

<$list filter='[tag[a]]' variable=1>
  <$list filter='[tag[b]]' variable=2>
    <$list filter='[tag<1>tag<2>]'>

    </$list>
  </$list>
</$list>
<$list fliter='[field:foo[bar]]>

</$list>

Writing this in Julia meant that I was able to start from scratch and make 
everything exactly how I wanted it, I am not sure how difficult it would be 
to implement this for tiddlywiki. We would have to be very careful because 
of how important filters are.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/4d8f95a1-197d-43ee-a1e0-a81c257cd9efo%40googlegroups.com.

Reply via email to