\define sira-office-csv()
<$list filter="[object-type[office]has[state-cover-office]]" variable=office>
<$view tiddler=<<office>> field=state-cover-office format=text/>,<$view tiddler=<<office>> field=office-address format=text/><br>
</$list>
\end
<$button message="tm-copy-to-clipboard" param=<<sira-office-csv>> >
Copy to clipboard
</$button>
\define sira-office-csv()
<$list filter="[object-type[office]has[state-cover-office]]" variable=office><$view tiddler=<<office>> field=state-cover-office format=text/>,<$view tiddler=<<office>> field=office-address format=text/></$list>
\end
<$wikify name=csv text=<<sira-office-csv>> >
<<csv>>
<$button message="tm-copy-to-clipboard" param=<<csv>> >
Copy to clipboard csv wikify
</$button>
</$wikify>
\define sira-office-csv()
<$list filter="[object-type[office]has[state-cover-office]]" variable=office>
<$view tiddler=<<office>> field=state-cover-office format=text/>,<$view tiddler=<<office>> field=office-address format=text/><br>
<
/$list>
\end
<$evaluate name=csv text=<<sira-office-csv>> delimiter="<cr><lf>">
<$button message="tm-copy-to-clipboard" param=<<csv>> >
Copy to clipboard
</$button>
</$evaluate>
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/882948ee-330c-4192-a869-f2153c52a331%40googlegroups.com.
.. but I keep spending inordinate amounts of time getting variable, parameters and references to transclude or not transclude at the correct time. I realise that it is my own ignorance of the parsing, but I find myself trying all the different methods until one accidentally works. by this I mean using $macrocall instead of <<>> based on where I need variables or transclusions to take place. Using $set, $wikify and $text. Or wrapping macros in other macros so that something can be set then called with $()$. Invariably I end up with a complex that when I look at it and refactor out all the unnecessary combinations I return to what appears to be the original solution, but that now works. I am a software developer with over 40 years experience and I am drowning. How must it be for the fiction book writer, research assistant or graphics artist?
I have managed to create a saver that uses diff-match-patch to reduce the average save to a few hundred bytes. I have combined this with PWA so that I can run TiddlyWiki as a stand-alone app on desktops and tablets that updates when on-line but work perfectly well (and very quickly off-line). At last, I (almost) have the environment I desire. I will publish my results once I have the kinks out - if I can ever work out when to use $$, $()$, <<>>, [[]] or {{}} with or without quotes :)
I will publish my results once I have the kinks out - if I can ever work out when to use $$, $()$, <<>>, [[]] or {{}} with or without quotes :)
[...] refactor out all the unnecessary combinations I return to what appears to be the original solution, but that now works.
[saver] I will publish my results once I have the kinks out
A key use case for Evaluate Wiki text and store the result as literal text
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/1e62e5c5-af44-4f48-a61c-fed15f79228e%40googlegroups.com.
@Paul[...] refactor out all the unnecessary combinations I return to what appears to be the original solution, but that now works.This made me laugh out loud from identifying with it.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddly...@googlegroups.com.
\define sira-office-csv()
<$list filter="[object-type[office]has[state-cover-office]]" variable=office emptyMessage="no matching tiddlers - check the filter!"><$view tiddler=<<office>> field=state-cover-office format=text/>, <$view tiddler=<<office>> field=office-address format=text/><br>
</$list>
\end
\define test()
<$wikify name=xx text=<<sira-office-csv>>>
<$action-sendmessage $message="tm-copy-to-clipboard" $param=<<xx>>/>
</$wikify>
\end
<$button actions=<<test>> >
Copy to clipboard
</$button>
I understand that there’s confusion around its usage, but I’m finding this thread hard to follow
I think what is lacking may be DEMONSTRATION?
What I mean is that the talk here is down in the macro world. But WHAT is the OUTCOME?
I think demonstrable application matters to comprehension by humans like me.
For me this fragility always appears in part of my code that is very hard to extract a simple demonstration case from. There are a few transclusions deep, a number of variables with a range of text references involved.
I don't claim to be a rocket scientist or brain surgeon but I know computers well and if after 3+ years if deep focus in tw5 and the help of smart people here, this all remains fragile then something is very wrong. Fortunatly since others seem to have the same problems it is not me who is mad.
My guess is those who understand how to combat this fragility have a level of expertise or tacit knowledge that even they do not know how to communicate it to others, especially less expirenced people.
Experts can often fix the issue in specific cases detailed in this forum, if the user can explain the details. Unfortunatly if someone else's issue is slightly different such solutions fail. This is the fragility.
If you teach a man to fish.....
Thanks for understanding the problem the tips etc...
The desire to solve it remains. I feel we need to step back and observe why people try and use it. Then provide a method in its place without the complexity. Perhaps almost over simplified.
This why I originally suggested an evaluate widget. The idea being to evaluate the values contained in text references and variables as they would appear on screen and store them in a variable as those values, not the original text. The key is to have the values evaluated and cast in stone.
The cause of the difficulty may be complex. Is there a simple answer buy stepping away from the details?
Tony
Put this in a tiddler and create some 2-3 other new tiddlers without changing their titles so they keep their "New Tiddler" names.
<$set name=a filter="[prefix[New]]">
<$button set=!!set setTo=<<a>>>
set
</$button>
</$set>
<$edit-text field=set size=55 />
<$set name=a filter="[prefix[New]]" select=0 >
<$button set=!!set2 setTo=<<a>>>
set select=0
</$button>
</$set>
<$edit-text field=set2 size=55 />
<$wikify name=a text="[prefix[New]]">
<$button set=!!wikify setTo=<<a>>>
wikify filterstring
</$button>
</$wikify>
<$edit-text field=wikify size=55/>
<$wikify name=a text={{{ [prefix[New]] }}}>
<$button set=!!wikify2 setTo=<<a>>>
wikify evaluated filter
</$button>
</$wikify>
<$edit-text field=wikify2 size=55/>
<$wikify name=a text={{{ one two }}}>
<$text text=<<a>>/>
</$wikify>
On 30 Jul 2019, at 14:06, Mat <matia...@gmail.com> wrote:I am frankly surprised by the last one - i.e why doesn't
<$wikify name=a text={{{ one two }}}>
<$text text=<<a>>/>
</$wikify>
give "one two" but only "one" ?
<$wikify name=a text=“one">
<$text text=<<a>>/>
</$wikify>
On 30 Jul 2019, at 15:17, Mat <matia...@gmail.com> wrote:That said; my moment of confusion was to assume that the triple braces should work as encapsulations just like for variables or transclusions... which also has to do with the format of the ouput of things!
Maybe a general tactic to avoid such confusions could be to have the user specify the output format explicitly... Perhaps some kind of filter operator "output[text]" or "output[rawhtml]" etc? Just an idea.
Can you expand on that? What do you mean by “encapsulation” here?
>Maybe a general tactic to avoid such confusions could be to have the user specify the output format explicitly... Perhaps some kind of filter operator "output[text]" or "output[rawhtml]" etc? Just an idea.
The result of a filter is always text.
Your contributions are welcome.
I am awaiting a medical diagnostic in hospital so can't review your code yet.
Tony
I Will place examples in This tread soon but as stated previously they tend to occur in less than strait forward situations.
One example I can explain easily is all the save and export templates. I would love to be able to capture what they generate and save them in a tiddler or clipboard. For example a json defined by a filter evaluated and stored in a variable or text field.
Regards
Tony