Hi Tony

Apologies for my earlier brief reply.

The key here is that line breaks in the original wikitext will appear in the 
output of the wikify widget. Here we only want a single line break at the end 
of each line. Try changing the template to:

<$list filter="[is[system]prefix[$:/plugin]]"><$text 
text=<<currentTiddler>>/>,{{!!plugin-type}}
</$list>

Best wishes

Jeremy


> On 22 Aug 2019, at 23:39, TonyM <[email protected]> wrote:
> 
> Jeremy et al..
> 
> I still can't resolve this and here is a minimal case that works on 
> Tiddlywiki.com
> 
> Tiddler that generates a CSV format output (on screen)
> <$list filter="[is[system]prefix[$:/plugin]]">
>   <$text text=<<currentTiddler>>/>,{{!!plugin-type}}<br>
> </$list>
> 
> Screen Looks like this
> $:/plugins/tiddlywiki/browser-sniff,plugin
> $:/plugins/tiddlywiki/evernote,plugin
> $:/plugins/tiddlywiki/nodewebkitsaver,plugin
> $:/plugins/tiddlywiki/railroad,plugin
> 
> A tiddler containing the copy to clipboard code
> \define actions()
> <$wikify name="content" text={{CSV output}} output=text>
> <$action-sendmessage $message="tm-copy-to-clipboard" $param=<<content>>/>
> </$wikify>
> \end
> <$button actions=<<actions>>>
> Copy to clipboard
> </$button>
> 
> After copying to clipboard a paste returns this exactly
> 
>   $:/plugins/tiddlywiki/browser-sniff,plugin
> 
>   $:/plugins/tiddlywiki/evernote,plugin
> 
>   $:/plugins/tiddlywiki/nodewebkitsaver,plugin
> 
>   $:/plugins/tiddlywiki/railroad,plugin
> 
> 
> Yes - full of unwanted line breaks and leading spaces and more in other 
> exampls
> 
> Yes I tried using output=formatedtext
> and I get exactly this
> 
> 
>   $:/plugins/tiddlywiki/browser-sniff,plugin  
> $:/plugins/tiddlywiki/evernote,plugin  
> $:/plugins/tiddlywiki/nodewebkitsaver,plugin 
> $:/plugins/tiddlywiki/railroad,plugin
> 
> 
> Also I tried all 4 combinations of output= text/formatedtext and 
> mode=block/linline
> 
> I just never get close to getting what I am after, something looking like it 
> is displayed.
> 
> Even if I get an answer for this use case it never seems very robust. How can 
> I go on to use this to do the same for more sophisticated tiddlers? with more 
> complex macros or JSON, html tiddlers etc...
> 
> Your continuously perplexed fan.
> Tony
> 
> On Thursday, August 22, 2019 at 6:32:19 PM UTC+10, Jeremy Ruston wrote:
> Hi Tony
> 
> A more minimal test case would be helpful.
> 
> You may want to explore the "output" attribute of the wikify widget.
> 
> Best wishes
> 
> Jeremy
> 
> 
> --
> Jeremy Ruston
> [email protected] <>
> https://jermolene.com <https://jermolene.com/>
> 
>> On 22 Aug 2019, at 00:52, TonyM <[email protected] <>> wrote:
>> 
>> 
>> Jeremy,
>> 
>> Thanks this method does copy a version of the rendered tiddler. However the 
>> result does not behave the same as if I were to copy the result of viewing 
>> the rendered tiddler.
>> 
>> I have tried changing the output but there is a fundamental difference - the 
>> clipboard always contains numerous extra Characters, resulting in multiple 
>> line feeds.
>> 
>> The following is an example of the macros in the tiddler I am trying to 
>> copy, basically it generates a CSV formatted output
>> <$list filter={{CMI Consultants list!!consultants-list}} variable=person>
>>    <$tiddler tiddler=<<person>> >
>>    <$text text=<<person>>/>,
>>     <<field discipline>>,
>>     Here: <<display-valid-services>>,
>>       <$list filter={{CMI office-list!!office-list}} variable=office>
>>            <$list filter="[<person-in-office-flag>limit[1]]" emptyMessage="" 
>> variable=result><<result>>,</$list>
>>       </$list>
>>    </$tiddler><br>
>> </$list><!-- people -->
>> 
>> Its output on screen looks like this
>> Prue Tannner, Occupational Therapist , Here: , ✔ , ✔ , ✔ , ✔ , , , , , , 
>> Renae Alarm, Occupational Therapist , Here: , ✔ , ✔ , ✔ , , , , , , , 
>> Manda Bell, Occupational Therapist , Here: , , , , , , , ✔ , , , 
>> Ant Cuttler, Rehabilitation Counsellor , Here: , ✔ , ✔ , , , , , , , , 
>> Linda Paxter, Rehabilitation Counsellor , Here: , ✔ , ✔ , ✔ , , , , , , , 
>> Linda Wooden, Occupational Therapist , Here: , , , , , , , , ✔ , , 
>> 
>> But the clipboard content separates every text element above with  multiple 
>> line feeds
>> 
>> It can only seem to me that wikify is not doing as advertised. Because of 
>> this I have sought other methods to resolve this without results.
>> 
>> Regards
>> Tony
>> 
>> 
>> 
>> On Wednesday, August 21, 2019 at 2:00:51 AM UTC+10, Jeremy Ruston wrote:
>> Hi Tony
>> 
>> Here's one way to do it. It's a classic application of the wikify widget: we 
>> need access to the wikified text of a tiddler, rather than its raw text.
>> 
>> Note how the actions are placed in a separate action string to avoid having 
>> to do the wikification until it is required (if it was within the button 
>> widget then the wikify widget would be re-evaluated each time the store 
>> changes).
>> 
>> Best wishes
>> 
>> Jeremy
>> 
>> 
>> \define actions()
>> <$wikify name="content" text={{HelloThere}}>
>> <$action-sendmessage $message="tm-copy-to-clipboard" $param=<<content>>/>
>> </$wikify>
>> \end
>> <$button actions=<<actions>>>
>> Copy to clipboard
>> </$button>
>> 
>> 
>> --
>> Jeremy Ruston
>> [email protected] <>
>> https://jermolene.com <https://jermolene.com/>
>> 
>>> On 19 Aug 2019, at 11:58, TonyM <[email protected] <>> wrote:
>>> 
>>> 
>>> Folks,
>>> 
>>> I believe I should know this, but I have a tiddler name "tiddlername" which 
>>> contains wikitext, list macros and more. Its a beautiful representation of 
>>> a csv file from my tiddler data and fields.
>>> 
>>> In any tiddler I can place {{tiddlername}} and see the wonderful result.
>>> 
>>> However I want to be able to copy the result as text 
>>> 
>>> <$button message="tm-copy-to-clipboard" param=  >
>>> Copy to clipboard
>>> </$button>
>>> 
>>> How do I provide this with the appropriate parameter ?
>>> 
>>> I have another tiddler called "realcutetiddler" which renders a really nice 
>>> HTML output. Rather than save this as a static html tiddler I would like to 
>>> copy the HTML result to the clipboard
>>> 
>>> Again How do I provide the above with the appropriate parameter ?
>>> 
>>> At the moment, with everything I try I just get in the clipboard the raw 
>>> unprocessed wiki text in my tiddlers.
>>> 
>>> Yours, very lost.
>>> 
>>> Tony
>>> 
>>> -- 
>>> 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 [email protected] <>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/tiddlywiki/08094092-20d2-43fc-b8d6-422eb07937f2%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/tiddlywiki/08094092-20d2-43fc-b8d6-422eb07937f2%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> 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 [email protected] <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/d5e28304-3270-4f25-b057-5c1ea1ff8616%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/d5e28304-3270-4f25-b057-5c1ea1ff8616%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/2f5de178-0705-4e6a-a535-93ca178e6aaf%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/2f5de178-0705-4e6a-a535-93ca178e6aaf%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/E804F909-0E1C-482F-BE5B-E830E5FFE4CC%40gmail.com.

Reply via email to