Jed,

Thanks so much for this tool, I just can't find the library format 
documentation, of course I can reverse engineer your code to determine the 
format but if you can point us to a document I would appreciate it.

It seems part of the complication is for those like myself unfamiliar with 
recipes.

Regards
Tony

On Sunday, April 19, 2020 at 7:35:20 PM UTC+10, Jed Carty wrote:
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7bfa7b48-2224-4537-9348-63245ac07238%40googlegroups.com.

Reply via email to