author: Christopher Mann
description: TWaaP - TiddlyWikiAsAPlugin - Export filter to create a plugin.
list: readme
plugin-type: plugin
title: $:/plugins/mannfr/twaap
type: application/json
version: 0.0.2-build007
{
"tiddlers": {
"$:/plugins/mannfr/twaap/config": {
"created": "20151107073238652",
"text": "# Title must follow convention for plugins, such as
$:/plugins/author/plugin_name\ntitle: $:/plugins/mannfr/twaap\nversion:
0.0.2-build007\nauthor: Christopher Mann\ndescription: TWaaP -
TiddlyWikiAsAPlugin - Export filter to create a plugin.\nlist: readme\n\n",
"modified": "20151107084740200",
"tags": "WikiAsAPlugin FromSubwiki",
"title": "$:/plugins/mannfr/twaap/config",
"type": "application/x-tiddler-dictionary"
},
"$:/plugins/mannfr/twaap/readme": {
"created": "20151107081239777",
"text": "This is an additional export filter. Save the file as
a .tld, for example for \"All Tiddlers\" in the side-menu. Save the file.
Import the file into another Wiki.\n\nTo configure, please change the
variables in [[$:/plugins/mannfr/twaap/config]].\n\nFor example, to create
this plugin, I did an advanced search with the filter
\"[tag[~WikiAsAPlugin]]\" and then simply exported the results as a
plugin.",
"title": "$:/plugins/mannfr/twaap/readme",
"tags": "WikiAsAPlugin FromSubwiki",
"modified": "20151107084400261"
},
"$:/plugins/mannfr/twaap/plugintiddlers": {
"created": "20151106222453723",
"text": "/*\\\ntitle: plugintiddlers\ntype:
application/javascript\nmodule-type: macro\n\nMacro to output tiddlers
matching a filter to Plugin\n\n\\*/\n(function(){\n\n/*jslint node: true,
browser: true */\n/*global $tw: false */\n\"use
strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name =
\"plugintiddlers\";\n\nexports.params = [\n\t{name:
\"filter\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(filter)
{\n\tvar data = {tiddlers: {}};\n\tvar tiddlers =
this.wiki.filterTiddlers(filter);\n\tfor(var t=0;t<tiddlers.length; t++)
{\n\t\tvar tiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\tif(tiddler)
{\n\t\t\tvar fields = new Object();\n\t\t\tfor(var field in tiddler.fields)
{\n\t\t\t\tfields[field] =
tiddler.getFieldString(field);\n\t\t\t}\n\t\t\tdata[\"tiddlers\"][fields[\"title\"]]
= fields;\n\t\t\tif (!(\"tags\" in data[\"tiddlers\"][fields[\"title\"]]))
{\n\t\t\t data[\"tiddlers\"][fields[\"title\"]][\"tags\"] =
\"\";\n\t\t\t}\n\t\t\tdata[\"tiddlers\"][fields[\"title\"]][\"tags\"] += \"
FromWikiAsAPlugin\";\n\t\t}\n\t}\n\treturn
JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n};\n\n})();\n",
"modified": "20151107083546128",
"module-type": "macro",
"tags": "WikiAsAPlugin FromSubwiki",
"title": "$:/plugins/mannfr/twaap/plugintiddlers",
"type": "application/javascript"
},
"$:/plugins/mannfr/twaap/export": {
"created": "20151106215643136",
"text": "\\define renderContent()\n<$text text=<<plugintiddlers
filter:\"\"\"$(exportFilter)$\"\"\">>/>\n\\end\nauthor:
{{$:/plugins/mannfr/twaap/config##author}}\ndescription:
{{$:/plugins/mannfr/twaap/config##description}}\nlist:
{{$:/plugins/mannfr/twaap/config##list}}\nplugin-type: plugin\ntitle:
{{$:/plugins/mannfr/twaap/config##title}}\ntype: application/json\nversion:
{{$:/plugins/mannfr/twaap/config##version}}\n\"\"\"\n\n\"\"\"\n<<renderContent>>\n",
"description": "~TwiddlyWiki as a Plugin (.tid)",
"extension": ".tld",
"modified": "20151107084633193",
"tags": "$:/tags/Exporter WikiAsAPlugin FromSubwiki",
"title": "$:/plugins/mannfr/twaap/export"
}
}
}
On Saturday, November 7, 2015 at 9:36:38 AM UTC+1, Tobias Beer wrote:
>
> Hi Christopher,
>
>
>> As Tinka stands, checking each checkbox is a too troublesome.
>>
>
> I very much agree, without some check-all option, setting it up ain't fun
> at all.
>
> Here is a WikiAsPlugin approach:
>>
>> 1. George sets up his personal library of plugins
>> 2. A button allows the publication of the current library to that
>> plugin library
>> 3. Any wiki can include another wiki as a plugin through that library
>>
>> The drawback would be in same-named toddlers being deleted with the
>> deleting or even disabling of the plugin.
>>
>
> I like the approach. Including wikis or just collections of tiddlers in
> other wikis has always been a very powerful thing. Without it, we'd have no
> plugins, for one. Currently, we are limited in leveraging this by a
> sophisticated plugin-mechanism that defies a simple "reuse tidbits"
> approach and forces a "publish a versioned bundle of codebits and
> supporting tids for distribution".
>
> When I was referring to "swarms", I meant precisely what you've had in
> mind. A few tiddlers forming a "swarm" that can move and reinstate in
> another context as simply as possible. No fuzz, no plugin, designed for
> content to bundle up and come to life elsewhere.
>
> Right now, what you've got for that is export/import.
>
> Best wishes,
>
> — tb
>
--
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/83253289-5944-487d-a7da-6e026e64c7f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.