To get the content for the files in a plugin library you can use this 
tiddler. Paste this into a tiddler and fill out the from. Unfortunately 
here you have to save the files manually by copying and pasting the text 
into the files indicated in the tiddler, I never got around to making an 
exporter that would put everything in the correct place. In this one the 
filter has to list only the plugin tiddlers that you want included in the 
library, trying to include non-plugin tiddlers will break things.

\define oneTiddler()
 <$list
   filter='[<theTiddler>fields[]] -text +[bl[]]'
 >
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;"<$view field='title' jsencoded/>": "<$view 
tiddler=<<theTiddler>> field=<<currentTiddler>> format=jsencoded/>",
 </$list>
 <$list
   filter='[<theTiddler>fields[]] -text +[bl[]]'
 >
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;"<$view field='title' jsencoded/>": "<$view 
tiddler=<<theTiddler>> field=<<currentTiddler>> format=jsencoded/>"
 </$list>
\end

\define jsonListing()
[<br>
<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
 variable=theTiddler
>
 &nbsp;&nbsp;{
 <<oneTiddler>>
 <br>
 &nbsp;&nbsp;},
 <br>
</$list>
<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
 variable=theTiddler
>
 &nbsp;&nbsp;{
 <<oneTiddler>>
 <br>
 &nbsp;&nbsp;}
 <br>
</$list>
]
\end

This packages the plugins returned by this filter into the format needed by 
a plugin library.

The file structure needs to be:

*Library Folder
** recipes
*** library
**** tiddlers
***** //individual tiddler json files//
**** tiddlers.json
** index.html

filter: <$edit-text tiddler='$:/state/PluginLibrary' field=filter/>


!! tiddlers.json

''filename:'' tiddlers.json

''contents:''

<<jsonListing>>

!! Tiddler JSON files:

<$list filter={{$:/state/PluginLibrary!!filter}}>

---
''filename:'' <$view field='title' format='urlencoded'/>.json

''contents:''

<$text text=<<jsontiddler>>/>
</$list>

-- 
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/854ee27e-fefc-45a9-8f5a-81352e581b7e%40googlegroups.com.

Reply via email to