Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-21 Thread 'Mark S.' via TiddlyWiki
What you have so far is a JS macro, not a widget. Widgets are, IMO, much more complicated than macros (and filter operators) and assume some deep understanding of TW without any clue how to gain that understanding. You can find a write-up on JS macros here: https://tiddlywiki.com/dev/index.html

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-21 Thread Jan
Hej Mat, I am a little stuck, I ve been looking for the site for the site Widgets for beginners but it seems to be down. (https://groups.google.com/forum/#!topic/TiddlyWiki/qgNY0iKRrOU) but it seems to be gone. The extract.js widget should have the following params: filter: A filter defining

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-21 Thread Jan
Hi Mark, you are right, I will try to finish this right now. I was preoccupied with the importing of text-files as you can see in Szenio.de/Test the last days Jan. Am 21.07.2019 um 21:57 schrieb Mat: Jan wrote: I will see what I can achieve. Jan, are you making any progress with this?

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-21 Thread Mat
Jan wrote: > I will see what I can achieve. > Jan, are you making any progress with this? I'm really curious to see what you achieve. As you may know, I once created the cherrypicker macro which was later a basis for T.Elmigers exctract macro, and I've alw

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-16 Thread Jan
Hi Mark, Hi Mat I am happy to hear that. To be honest I would not have not have managed to do this without your help, in fact it is the second thing in javascript I ever did. I got a small amelioration: |if (text !== null) {...| avoids red alerts which were happend before so we have this: |/*

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-16 Thread 'Mark S.' via TiddlyWiki
Do you mean *Jan's* macro? On Tuesday, July 16, 2019 at 4:27:50 AM UTC-7, Mat wrote: > > Mark, I have a strong feeling your macro will be very useful for me. > Would you mind documenting it a little in the "Information about this > macro" part (what it does, how to use)? > And might it be somethi

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-16 Thread Mat
Mark, I have a strong feeling your macro will be very useful for me. Would you mind documenting it a little in the "Information about this macro" part (what it does, how to use)? And might it be something relevant to integrate into your PR ? Tha

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread Jan
Hi Mark, great, this works perfect and I do not need links anyway. Thanks for solving this! Best wishes Jan Am 15.07.2019 um 22:48 schrieb 'Mark S.' via TiddlyWiki: Actually, what I think you see is Mr. Test What's happening is that the macro is being returned as [[Mr. Test]] and then strip

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread 'Mark S.' via TiddlyWiki
Actually, what I think you see is Mr. Test What's happening is that the macro is being returned as [[Mr. Test]] and then stripped of the brackets at the WikifyWidget. One work-around is to add additional brackets back in your macro. Also, this var regex = /\[.*?\]\]/g; Should be this var

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread Jan
Hi Mark, that looks great, is this already available? Meanwhile I created a solution which is working quit good but has one flaw which I would like to eliminate: [[Mr. Test]] Gets parsed [[Mr.]] and [[Test]]. Here comes the approach it is a Widget and a macro in combination: |Widget|

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread 'Mark S.' via TiddlyWiki
With the reg expression text previously mentioned, and the regexps (reg expression string extractor) in PR 2963 it should be possible to extract links designated with [[ and ]] . On Monday, July 15, 2019 at 4:06:31 AM UTC-7, Jan wrote: > > Hi

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread Jan
Am 15.07.2019 um 14:42 schrieb Jan: AFAIK the widget is applied before the Links are rendered when I call it like that. <$macrocall $name="roles" text={{!!dialogue}}/> So the input does not seem to be the problem - it is the widget. Jan Am 15.07.2019 um 13:28 schrieb TonyM: This is pa

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread Jan
AFAIK the widget is applied before the Links are rendered when I call it like that. <$macrocall $name="roles" text={{!!dialogue}}/> So the input does not seem to be the problem - it is the widget. Jan Am 15.07.2019 um 13:28 schrieb TonyM: This is part of the render process already. Pe

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread TonyM
This is part of the render process already. Perhaps it just needs a method to access it. Jeremy is talking about opening more of the core features to user config. *See Control Panel > Infor > Advanced > Parsing > wikilink * Here you can enable and disable it for text fields. This may help you

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-15 Thread Jan
Hi, alas the Find-Macro and also the Extract-Macro fail in this job. This really seems to be an issue for a widget which can escape the square-bracket-problem. I made a quick attempt to solve this problem with a widget matching for the css, with no success so far. |/*\ title: $:/core/module

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Jan Johannpeter
Hi Mark, thanks, again you saved my day! I will implement this at once! Jan Mohammad schrieb am So. 14. Juli 2019 um 19:18: > Hi Mark, > I was surprised with this simple and elegant solution you proposed albeit > the regxp is behind my knowledge! :-) > > Added to TW-Scripts. > > Cheers > Moham

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Mohammad
Hi Mark, I was surprised with this simple and elegant solution you proposed albeit the regxp is behind my knowledge! :-) Added to TW-Scripts. Cheers Mohammad On Sunday, July 14, 2019 at 9:21:42 PM UTC+4:30, Mark S. wrote: > > You need to put your expression in a separate variable: > > <$vars

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread 'Mark S.' via TiddlyWiki
You need to put your expression in a separate variable: <$vars reg="(?g)\[\[.*?\]\]"> <$list filter="[!is[system]regexp:myfield]"/> I tested using field "myfield". I was surprised to find that there actually is a matching field at tiddlywiki.com. Note that the regexp filter has its own notatio

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Mohammad
Jan, Have you tried the find macro! It easily find such cases! The find macro actually find patterns and return the content! -Mohammad On Sunday, July 14, 2019 at 2:56:33 PM UTC+4:30, Jan wrote: > > Hi Mark > thanks for the clarification, it would be nice if the filter could detect > all links

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Jan
Hi Mat, Unfortunately filtersyntax gets so terribly complicated when the param contains squarebrackets. This here causes a syntax error: [!is[system]regexp[/\[.*?\]/g]] And how do I enter the suffix for the field? -Jan Am 14.07.2019 um 12:03 schrieb Mat: >or else it would probably be veeer

Re: [tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Jan
Hi Mark thanks for the clarification, it would be nice if the filter could detect all links sourrounded by double brackets. -Jan PS: It would be great if the LinksOperator hat a field parameter... Am 14.07.2019 um 12:03 schrieb Mat: >or else it would probably be veeery tricky to find them.

[tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Mat
>or else it would probably be veeery tricky to find them. Pah! I'm exaggerating. It is "just" a matter of creating the right regexp for it. Not that I could do it. <:-) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this gr

[tw5] Re: Is there a filter to find links in other fields than text

2019-07-14 Thread Mat
Find links in general or find specific links? The former is more complicated but as a smallest requirement it would probably demand that links are enclosed in [[brackets]], i.e not camelcase or else it would probably be veeery tricky to find them. If it is merely a question of finding speci