[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-18 Thread Ton Gerner
On Wednesday, July 18, 2018 at 11:34:48 AM UTC+2, JD wrote: > > http://www.tongerner.nl/ tab 'Techniek', click the link 'Techniek'. >> In the 'Techniek' wiki choose 'Marineschepen' from the 'Techniek' menu. >> Tab 'Databank' > 'Pennantnummers' shows listings of different kinds of >> ships filter

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-18 Thread JD
> > http://www.tongerner.nl/ tab 'Techniek', click the link 'Techniek'. > In the 'Techniek' wiki choose 'Marineschepen' from the 'Techniek' menu. > Tab 'Databank' > 'Pennantnummers' shows listings of different kinds of > ships filtered by pennant nummber. The only exception is > Ondersteuningsva

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-17 Thread Ton Gerner
@mauloop, Nice to see another approach that could help me. As they say: *There is more than one way to skin a cat.* @Mark.S > I'm guessing the original had commas because they were pulled out of a CSV listing? No, everything was added by hand. Some more background. It all started with a bunc

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-17 Thread 'Mark S.' via TiddlyWiki
That looks great! Something of a digression, but ideally neither of our approaches would be needed if the veld field were formatted as a TW list. And as long as the entries in the list had no spaces in their names, it could have been as simple as: J6 1947- JT6 1950- D804 1958- F812

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-17 Thread mauloop
Recently I had a need quite close to your use case. I tried to adapt my solution to your case. It uses just vanilla TW features. Take it just as an exercise. Mark S. solution is more elegant than mine. \define list-all-codes() <$set name="f" filter="""[has[veld]get[veld]]"""> <$wikify name="ac"

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-16 Thread Ton Gerner
Hi Mark, > I was looking at the each code to see if I could make an "each string" > macro. It turns out that there is an undocumented feature in the *each* > filter. A list like this: > > <$list filter="[has[veld]regexps:veld[(C\d\d\d)]each:value[title]sort[]]" > variable="code"> > > May do wh

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-16 Thread 'Mark S.' via TiddlyWiki
Stop the presses! I was looking at the each code to see if I could make an "each string" macro. It turns out that there is an undocumented feature in the *each* filter. A list like this: <$list filter="[has[veld]regexps:veld[(C\d\d\d)]each:value[title]sort[]]" variable="code"> May do what you

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-16 Thread Ton Gerner
Hi Mark, Your solution using the each filter operator works great. The disadvantage of creating (empty) tiddlers is not that important to me. My 4 MB TW contains already about 1800 tiddlers and not all series of 'codes' contain doubles. In practice it means I need to have about 100 tiddlers ext

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-15 Thread Ton Gerner
Hi Mark An awful job? > As passingby wrote, I mean awesome. I am grateful for what you already did for me. > > I can tell you how to fix it, but you may not like it. The pieces of text > that are currently split off into "titles" do not represent tiddlers (at > least not in your sample TW).

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-15 Thread passingby
On Sunday, July 15, 2018 at 1:43:24 PM UTC-6, Mark S. wrote: > > An awful job? > >> >> I suspect its a typo and was meant to be 'awesome' -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails fr

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-15 Thread 'Mark S.' via TiddlyWiki
An awful job? I can tell you how to fix it, but you may not like it. The pieces of text that are currently split off into "titles" do not represent tiddlers (at least not in your sample TW). But many of the filter operators want to work on real tiddlers. There is an operator that can make sur

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-15 Thread Ton Gerner
Hi Mark, The wikitext + regexps.js filter code you gave does an awful job and saves me a lot of manual 'writing'. But (there is always a but) I forgot to mention that sometimes more than one tiddler can contain the same code e.g. `D801`. In such a case I expected to see 2 tiddlers with D801 in t

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-13 Thread Ton Gerner
Mark, You've made my day! This exactly what I wanted. Thanks again, Ton -- 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+unsubscr...@googlegroups.com.

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-13 Thread 'Mark S.' via TiddlyWiki
With the regexps filter, the table can be created like this: <$list filter="[has[veld]regexps:veld[(C\d\d\d)]sort[]]" variable="code"> <$list filter="[search:veld]"> <> <$link to={{!!title}}> <$view field="title"/> <$view field="veld"/>

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-13 Thread 'Mark S.' via TiddlyWiki
The regexps filter not only finds matches, but turns the matches into output strings. Something like that is necessary when you want to split up lines. The only way (that I can think of ) to do it without a special filter to have an outer list that has ALL possible special codes. Not infeasible

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-13 Thread Ton Gerner
Hi Mark, Thanks for answering. For me it is the first time I use regexp; up till now it was only abracadabra for me (as is Javascript). I am not a coder; just a longtime user of TW. May be I am wrong but I do not see how your regexps filter can bring me more than what `[regexp:veld[C\d\d\d]]`

[tw5] Re: How to extract part of a field and sort extracted stuff

2018-07-13 Thread 'Mark S.' via TiddlyWiki
You need a filter that can actually split out the contents you want in Cxyz. Perhaps: https://github.com/Jermolene/TiddlyWiki5/pull/2963 Then you can have an outer list that finds the elements, and an inner list that uses those elements to find the tiddlers that match the elements. -- Mark