good points. OK, I'll do the rwo lists imbicated. Yet, I cannot see why I
get exactly the same results in the two lists below.
<$set name="chrome" value="[tag[Chrome]]">
<$list
filter="[subfilter<chrome>lowercase[]sentencecase[]splitregexp[\W]!is[blank]addprefix[
* ]]"/>
</$set>
<$set name="chrome" value="[tag[Chrome]]">
<$list
filter="[tag[Chrome]lowercase[]sentencecase[]splitregexp[\W]!is[blank]addprefix[
* ]]"/>
</$set>
which is
* noteself * by * danielo * rodr * guez * savetiddlers * extension * for *
chrome * and * firefox * by * buggyj * Emergency * tiddler * export *
Saving * on * tiddlyspot * Saving * to * a * git * service * Saving * via *
a * minimal * ruby * server * Saving * via * webdav * Saving * with * the *
html5 * fallback * saver * Tiddlydrive * add * on * for * google * drive *
by * joshua * stubbs * Tiddlywiki * cloud * Timimi * webextension * and *
native * host * by * riz
And same with
<$set name="chrome" value="[tag[Chrome]]">
<$list
filter="[subfilter<chrome>lowercase[]sentencecase[]splitregexp[\W]!is[blank]first[]]"/>
</$set>
<$set name="chrome" value="[tag[Chrome]]">
<$list
filter="[tag[Chrome]lowercase[]sentencecase[]splitregexp[\W]!is[blank]first[]]"/>
</$set>
where the result is:
noteself
(from ~"noteself" by danielo rodríguez~)
What's the use of subfilter in real life? It seems such a strange beast.
I'm really confused. I wish there be an equivalent of map() found in
functional language. I thought subfilter was just that but visibly it is
not.
with map I would code:
<$set name="chrome" value="[tag[Chrome]]">
<$list
filter="[subfilter<chrome>lowercase[]sentencecase[]splitregexp[\W]!is[blank]first[]]"/>
</$set>
In fact, I'm perplex when reading the subfilter help and the examples don't
help me. In particular, I am at odds with the input and the parameter S. S
is said to be a filter expression. And the outpur is the selection of
titles returned from the subfilter S. Let's see.
in the complete filter below, what is the input and what is the parameter S?
[subfilter[one two three]addsuffix[!]]
input should be: every tiddlers (but system tiddlers).
S is <<one two three>> and so S is a collection of three tiddler titles.
The output of subfilter is S, right?
Although it does not seems so because [[one two three]addsuffix[!]] does
not produce the same result ("one two three!" instead of "one! two!
three!").
Le lundi 26 octobre 2020 à 19:00:52 UTC+1, Mark S. a écrit :
> There are two mistakes in this:
>
> <list filter="[subfilter<chrome> splitregexp[\W]!is[blank]first[]]"/>
>
> 1. It should be $list. 2. There is a space in front of splitregexp.
>
> Unfortunately, using a subfilter won't allow you to process the tiddlers
> the way you want. You will need a nested loop, with the outer list finding
> the tiddlers and the inner list extracting the first word.
>
>
>
> On Monday, October 26, 2020 at 10:41:29 AM UTC-7, Jean-Pierre Rivière
> wrote:
>>
>> I have a liste of tiddlers (got with something like filter="[tag[foo]]")
>> of which I want the first word/letter.
>>
>> For only the last single title I get the first word with
>> filter="[tag[Chrome]last[]splitregexp[\W]!is[blank]first[]]"
>>
>> Now, how to get it for all the titles, entirely within a single filter if
>> possible (I'd rather avoid a list widget to achieve that)? Definitely
>> something to do with subfilter. But no, I still can't get it. Frustrating.
>> My initial coding:
>>
>> <$set name="chrome" value="[tag[Chrome]]">
>> <list filter="[subfilter<chrome> splitregexp[\W]!is[blank]first[]]"/>
>> </$set>
>>
>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/9270db2e-66c4-420e-b665-1d072a382138n%40googlegroups.com.