I'm hoping to make a smoothifier for "community TW's" - a macro to use like so:
<<url "https://github.com/Jermolene/TiddlyWiki5/issues/1755">> or <<url "http://twaddle.tiddlyspot.com/#Bigger%20community%20%E2%87%84%20Better%20TW" >> ...to respectively get: 1755 <https://github.com/Jermolene/TiddlyWiki5/issues/1755> Bigger%20community%20%E2%87%84%20Better%20TW <http://twaddle.tiddlyspot.com/#Bigger%20community%20%E2%87%84%20Better%20TW> or ideally Bigger community ⇄ Better TW <http://twaddle.tiddlyspot.com/#Bigger%20community%20%E2%87%84%20Better%20TW> I figure it will be useful for community sites, at least my TWaddle <http://twaddle.tiddlyspot.com> site In trying to create this, the following is what I've come up with... but... (1) it doesn't work (2) it uses hardcoded prefix (first part of url) because I don't know how to split out backwards, i.e from right-to-left, in the string. (3) is seems generally awkward that I should "list filter" when I know it's only one item concerned, i.e the macro argument. \define url(url) <$list filter="[field:title[$url$]]"> <$list filter= "[removeprefix[https://github.com/Jermolene/TiddlyWiki5/issues/]]"> <a href="$url$" target="_blank">#{{!!title}}</a> </$list> </$list> \end Is there some widget that is more directly "Do" (some action widget perhaps?) rather than "Filter out + do + list"? Something like; \define url(url) <$do "$url$" "[removeprefix[https://github.com/Jermolene/TiddlyWiki5/issues/]]"> <a href="$url$" target="_blank">#{{!!title}}</a> </$do> \end ...and/or, dealing with the hardcoded url, is there some kind of splitbefore operator that could, perhaps working from the end of the string, recognize wild characters - in my case specified to be numbers like the following. Here "/#" is meant as a (path-) slash followed by three digits which, because of working from right to left, splits out /1755. \define url(url) <$splitout righttoleft "/#" "$url$"> <a href="$url$" target="_blank">#result</a> </$splitout> \end <:-) -- 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. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f7b0470f-26ee-40d1-8784-4d0a783080ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.