I was thinking of export options for NoteWritey, when I remembered that TW 
5.1.23 will have a new zip plugin update. In fact, it actually works now in 
5.1.22 if you drag and drop  in the jszip plugin from the prerelease. Well, 
I think it does.

As you may know, when you try to export multiple tiddlers in the "tid" 
format, you only get one tiddler as output. With the following code, you 
can export multiple tiddlers packed into a zip file which you can then 
extract using your favorite zip manager.

I'm sure over time people will come up with much more clever uses for the 
zip plugin, but in the meantime, here's a first stab. The macro takes a 
filter, and output name, and title for the button.


\define ziptid(filter: "[all[tiddlers]]" , output: "tiddlers.zip" , title:"Make 
Zip")
<$button> $title$
<$vars ziptid="$:/temp/zip">
<$action-sendmessage $message="tm-zip-create" $param=<<ziptid>>/>

<$vars sys="$:/" >
<$list filter="""$filter$""">
<$vars 
fname={{{[<currentTiddler>split<sys>join[_]split[/]join[_]addsuffix[.tid]] 
}}} >
<$action-sendmessage $message="tm-zip-render-file" $param=<<ziptid>> 
filename=<<fname>> tiddler=<<currentTiddler>> template="$:/core/templates/
tid-tiddler" mode="block" output="text/plain"/>
</$vars>
</$list>
</$vars>
<$action-sendmessage $message="tm-zip-download" $param=<<ziptid>> 
filename="""$output$"""/>

</$vars>
</$button>
\end

<<ziptid "[tag[Learning]]" "Learning.zip" "Zip Learning">>


-- 
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/38cd0ea0-b76c-4231-af81-2e509662e563o%40googlegroups.com.

Reply via email to