I am having a really hard time reading anything on your site (I am 
dyslexic, the colors and lines are more than I can do), so I am not sure 
what state your work is in, but this is a thing I was playing around with 
when trying to see if I could make a simpler way to make plugin libraries, 
it is one tiddler that packages plugins in the browser and one that puts it 
all into a format for the plugin library files, I never got around to 
seeing if I could make an exporter taht would export the plugin library 
files in bulk, there is probably some way to do it.

\define plugintext()
{
"tiddlers": {<$list 
filter='[subfilter{$:/state/MakePlugin!!filter}]+[bl[]]'>
"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler 
"jsontiddlers Macro">>/>,
</$list>
<$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[last[]]'>
"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler 
"jsontiddlers Macro">>/></$list>
}
}
\end

Name: <$edit-text tiddler='$:/state/MakePlugin' field='name' 
class='tc-edit-texteditor'/>
Filter: <$edit-text tiddler='$:/state/MakePlugin' field='filter' 
class='tc-edit-texteditor'/>
Description: <$edit-text tiddler='$:/state/MakePlugin' field='description' 
class='tc-edit-texteditor'/>
List: <$edit-text tiddler='$:/state/MakePlugin' field='list' 
class='tc-edit-texteditor'/>
Version: <$edit-text tiddler='$:/state/MakePlugin' field='version' 
class='tc-edit-texteditor'/>

<$button>
Make Plugin
<$wikify name=pluginText text="<<plugintext>>">
<$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
text=<<pluginText>> type='application/json' 
description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
version={{$:/state/MakePlugin!!version}}/>
</$wikify>
</$button>

and then to get the plugins formatted for the files used by a plugin 
library:

title: Make Plugin Library

\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:''

<<jsontiddler>>
</$list>


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev/22470ba1-782f-4a7b-aee2-f1adbe829bb2%40googlegroups.com.

Reply via email to