Hi Wimm!
Exporting the Storyriver to .json sounds seductive. I would be happy if you could post this. The construction is the following, is there an additional expression for the exportbutton() to make it export a json-file

\define download-param()
\define saveTiddlerFilter() $(var-user-filter)$ +[sort[title]]

\define savingEmpty() yes

{{$:/core/templates/tiddlywiki5.html}}
\end

\define templatebutton()
<$button set="$:/temp/SaveMyNewTiddlersTemplate" setTo=<<download-param>> to={{!!title}}>{{!!limit}}</$button>
\end

\define userexport()
[modifier[$(exportuser)$]!is[system]!sort[modified]limit[$(exportnum)$]]
\end

\define exportbutton() <$button message="tm-download-file" param="$:/temp/SaveMyNewTiddlersTemplate" title="Export">Die neuesten {{!!limit}} Einträge von {{$:/status/UserName}} exportieren</$button>

<$set name="exportnum" value={{!!limit}}>
<$set name="exportuser" value={{$:/status/UserName}}><br>
<$set name="var-user-filter" value=<<userexport>> >
<<templatebutton>>
</$set>
<<exportbutton>>
<hr>
<span title="Wieviele"><$edit-text tag="input" field="limit" default="Wieviele?"/></span>
<$set name="exportnum" value={{!!limit}}>
<span title="Wer"><$edit-text tiddler="$:/status/UserName" tag="input" type="text"/></span>
<$set name="exportnum" value={{!!limit}}>
<$set name="exportuser" value={{$:/status/UserName}}><br>
<$list filter=<<userexport>> ><br><<currentTiddler>></$list>
</$set>


cheers Jan




Am 06.07.2016 um 22:02 schrieb wimm:
there are some macros for exporting to json.
they include the exportbutton icon.

they require a filter as parameter to specify the tiddlers you want to export. 
the filter for a single tiddler is created with another macro to surround the 
tiddler title with [[]].

it also requires a lingoBase parameter

and a baseFilename

search for exportbu  in advanced search tab shadow tiddlers

you are probably looking for macros/export which contains a action sendmessage 
tm-download...

it is not easy to convert into something else, there is a lot of dependencies 
embedded in download.js

(for my specific implementation I had to modify download.js as well, auto 
datetime signing name added filename from tiddler without url encoding for 
local file names, exporting story river to json ..)

hope this helps a little


--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/577D7BB4.4070404%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to