[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-12-01 Thread Jean-Pierre Rivière
@Sylvain 1) of course you can use my code! 2) you could have a dictionnary when key "SN" would be valued at "Sylvain Naudin" but that would not do for two people with the same initial. Alternatively, you could have several values for SN, a bit like a hash-table can have internally. Then you co

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-11-28 Thread Sylvain Naudin
Bonsoir Jean-Pierre, Hi Tones, I'm playing with a simple phone book / member organisation tool. Here the last share version : https://tw5.xyz/Annuaire/annuaire.html 1/ I'm wondering If I could put some of your code to create an index, like you idea with first letter from tiddler, that would be g

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-11-18 Thread TW Tones
Jean-Pierre, Thanks for sharing back. Just remember {{<>}} is overloading the shortcut syntax for transcludes, when we use shortcuts they are typically less featured and we need to resort to the long forms such as the transclude widget. However as you become experienced with filters the trip

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-11-18 Thread Jean-Pierre Rivière
As a final reply to this post, I can now show you a working solution, complete within my project: elaborating a glossary entry for French. \define all-initials() <$list filter="[tag[glossaire]]"> <$set name=1st value={{{ [all[current]split[]first[]] }}}> <<1st>> \end \define glossa

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-11-01 Thread Eric Shulman
On Tuesday, October 27, 2020 at 6:53:17 PM UTC-7, Jean-Pierre Rivière wrote: > > Other than a question of taste, or of giving a meaningful name to a > complex filter preceding the get operator in my example, it seems that > subfilter has no other intterest, isn't it? As I already noted in a pre

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-11-01 Thread Thomas Stone
Can you provide some sample data that shows what the TW filter is doing, and then an example of what you would like it to do? On Wednesday, October 28, 2020 at 1:06:39 AM UTC-7 jn.pierr...@gmail.com wrote: > Now that I know how to fetch the first letter of a given tiddler title, I > am not up

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-28 Thread TW Tones
Jean-Pierre , Its late here in Sydney, so I can look at this tomorrow, if no one else has, however can I suggest you try an come at this from a different direction! Alternatively can I suggest it will be easier for you if you state > Please do say what you want to do with the first word / lette

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-28 Thread Jean-Pierre Rivière
Now that I know how to fetch the first letter of a given tiddler title, I am not up to my task alas. Because the bit of code shown to me is unable to permit me to have list of all initial letters with only one of each letter concerned. This means I need to have firsthand all the initial inside m

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-28 Thread Jean-Pierre Rivière
<$list filter="[tag[TableOfContents]]"> <$set name=1st value={{{ [all[current]split[]first[]] }}}> <$set name=1stWord value={{{ [all[current]split[ ]first[]] }}}> <<1st>> <<1stWord>> <$link/> is really what I wanted to know how to do. I failed to spot your message. Many thanks

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-27 Thread Jean-Pierre Rivière
Great! This example really explains subfilter to me. Also shows what you tell about named filter. It should made it to the official documentation IMHO. although I 't try (yet) to see the differences between subfilter and the newer filter to come, because it would be disastrous for my peace of m

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-27 Thread Jean-Pierre Rivière
After some more work, I have seen this: \define themorama() [tag[thème]] <$list filter="[subfilter]+[get[theme]]"> $$$ <$link/> <$list filter="[tag[thème]get[theme]]"> (T) <$link/> the two list have the same functionnality. The syntax is different. Other than a question of taste, or of givi

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-27 Thread TW Tones
Jeanne-Pierre, On Wednesday, 28 October 2020 11:39:03 UTC+11, Jean-Pierre Rivière wrote: > > I'm not really understanding what your code below aim to achieve (although > I tried it): > > \define system-tags() text title modified modifier created creator tags > list list-after list-before caption

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-27 Thread Jean-Pierre Rivière
I'm not really understanding what your code below aim to achieve (although I tried it): \define system-tags() text title modified modifier created creator tags list list-after list-before caption type <$list filter="[fields[]!subfilter]"> I got unexisting tiddlers, or macros tiddlers but with

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread TW Tones
Mark, One compelling use of the subfilter is to access a list and apply it to another; \define system-tags() text title modified modifier created creator tags list list-after list-before caption type <$list filter="[fields[]!subfilter]"> The advantage being you can create global macros to u

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread 'Mark S.' via TiddlyWiki
subfilter doesn't do "map" or any of those neat things. It just allows a variable that you may have constructed outside the main filter to be used as an additional filter. Personally I haven't found it to be that useful. [[tag[HelloThere]subfilter] > [subfilter[one two three]addsuffix[!]] > >

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread TW Tones
Jean-Pierre, Please do say what you want to do with the first word / letter ? - Below are some examples that should solve your issues - Filters as a rule generate one output so I like to focus on the selected tiddler then process it later. Thanks for sharing code that works on TiddlyW

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread Eric Shulman
On Monday, October 26, 2020 at 3:10:59 PM UTC-7, Jean-Pierre Rivière wrote: > > 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 i

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread Jean-Pierre Rivière
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="[subfilterlowercase[]sentencecase[]splitregexp[\W]!is[blank]addprefix[ * ]]"/> <$set name="chrome" value="

[tw5] Re: geztting the first word/letter of a list of tiddlers

2020-10-26 Thread 'Mark S.' via TiddlyWiki
There are two mistakes in this: 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 t