You are really thorough!

See my commens below.

Let's set the bases:
> - node 10.3.0, tiddlywiki 5.1.17
> - I'm talking about tiddlywiki with node.js and hence about WikiFolders
> wiki's.
> - Even if I use forward slashes in some description I'm working on windows
> so real fs paths use backslashes, but I hope it doesn't make difference.
> - I tried to run tiddlywiki both directly with node.js and with
> TiddlyServer but it doesn't make difference.
> - after a manual change of wiki fs contents, tiddlywiki is always
> restarted.
>
> I setup a wiki with this structure:
>
> plugins  (same level as wf)
> wf   (that in a creative flare stands for wiki folder :)
> wf/plugins
> wf/tiddlers
> wf/_system/config/FileSystemPaths.tid  (
> [is[system]removeprefix[$:/]addprefix[_system/]])
> wf/tiddlywiki.info (the one from  Jermolene/TiddlyWiki5/editions/server/
> tiddlywiki.info)
>
> Then i took Jermolene/TiddlyWiki5SamplePlugin/SamplePluginWiki and i
> proudly renamed it into  $:/plugins/gg/sample-plugin building it in a
> directory structure equal to the plugin name plugins/gg/sample-plugin
> with the following plugin.info
>
> {
>     "title": "$:/plugins/gg/sample-plugin",
>     "description": "Reverse macro plugin",
>     "author": "me",
>     "version": "0.0.1",
>     "core-version": ">=5.0.0",
>     "source": "",
>     "plugin-type": "plugin",
>     "list": "readme license history"
> }
>
>
> Now all that I want to do is to deploy that plugin into the wiki.
> I was not able from the doc to understand what's the correct way to do it.
> I was expecting that, packed or unpacked, the handling of plugins would be
> symmetrical, but after a number of attempts I'm, well, let's say, a bit
> perplexed about the seemingly schizophrenic behavior of plugin mechanism
> handling of packed and unpacked plugins.
>
> 1- drag and drop the plugin on the browser. The plugin is deployed packed
> as "wf/tiddlers/_system/plugins/gg/sample-plugin.tid" and is listed as
> regular plugin.
>
> 2- copy gg/sample-plugin *unpacked *into wf/tiddlers/_system/plugins. *The
> tiddlers are loaded but it is not identified as plugin*.
> 2a- copy gg/sample-plugin.tid *packed *into wf/tiddlers/_system/plugins. *The
> plugin is deployed and is listed as regular plugin*. (same as case 1)
>
> 3- copy sample-plugin *unpacked *into wf/tiddlers/_system/plugins. *The
> tiddlers are loaded with the correct prefix* ($:/plugins/gg/sample-plugin)
> *but it is not identified as plugin*.
> 3a- copy sample-plugin.tid *packed *into wf/tiddlers/_system/plugins. *The
> plugin is deployed and is listed as regular plugin*.
>

Scenario 1, 2a, and 3a are the same thing. Scenarios 2 and 3 are the way
TiddlyWiki handles regular tiddlers. So it is expected to do that as well
because the tiddlers folder is for regular tiddlers that need to be loaded
as regular tiddlers not shadow tiddlers to allow editing.


> 4- copy gg/sample-plugin *unpacked *into wf/plugins. "Warning: missing
> plugin.info file in C:\home\web\TiddlyWiki\wf\plugins\gg" at tiddlywiki
> boot. Plugin is ignored, tiddlers are not loaded.
> 4a- copy gg/sample-plugin.tid *packed *into wf/plugins. "Warning: missing
> plugin.info file in C:\home\web\TiddlyWiki\wf\plugins\gg" at tiddlywiki
> boot. Plugin is ignored, tiddlers are not loaded.
>

Interesting, didn't know the plugins directory expects to be one level, but
it makes sense.


> 5- copy sample-plugin *unpacked *into wf/plugins. *The plugin is deployed
> and is listed as regular plugin*, but I lost the directory structure
> (plugins/publisher/name).
> 5a- copy sample-plugin.tid *packed *into wf/plugins. *Plugin is ignored,
> tiddlers are not loaded*.
>

5 is the expected way to use the plugins folder, as usual, 5a does not work
because we are not in the tiddlers folder.


> 6- copy gg/sample-plugin *unpacked *into wf/plugins, adding
> "gg/sample-plugin" to the plugins list into wf/tiddlywiki.info. *The
> plugin is deployed and is listed as regular plugin*, but I still get
> "Warning: missing plugin.info file in
> C:\home\web\TiddlyWiki\wf\plugins\gg" at tiddlywiki boot.
>

Apparently you also have a copy of it in
TiddlyWiki/plugins/gg/sample-plugin, notice not in the wf folder, but the
plugins folder beside it. That is the copy that was loaded.

6a- copy gg/sample-plugin.tid *packed *into wf/plugins, adding
> "gg/sample-plugin" to the plugins list into wf/tiddlywiki.info.* Plugin
> is ignored, tiddlers are not loaded*. "Warning: missing plugin.info file
> in C:\home\web\TiddlyWiki\wf\plugins\gg" at tiddlywiki boot.
>

Same as before, we are outside tiddlers directory.

7- copy gg/sample-plugin *unpacked *into "plugins", adding "set
> TIDDLYWIKI_PLUGIN_PATH=..\plugins" to the tiddlywiki start script. Plugin
> is ignored, tiddlers are not loaded.
>

Correct if not listed in tiddlywiki.info.

7a- copy gg/sample-plugin.tid *packed *into "plugins", adding "set
> TIDDLYWIKI_PLUGIN_PATH=..\plugins" to the tiddlywiki start script. Plugin
> is ignored, tiddlers are not loaded.
>
> 8- copy gg/sample-plugin *unpacked *into "plugins", adding "set
> TIDDLYWIKI_PLUGIN_PATH=..\plugins" to the tiddlywiki start script and
> "gg/sample-plugin" to the plugins list into wf/tiddlywiki.info. *The
> plugin is deployed and is listed as regular plugin*.
> 8a- copy gg/sample-plugin.tid *packed *into "plugins", adding "set
> TIDDLYWIKI_PLUGIN_PATH=..\plugins" to the tiddlywiki start script and
> "gg/sample-plugin" to the plugins list into wf/tiddlywiki.info. *Plugin
> is ignored, tiddlers are not loaded*.
>

8 is the correct way to load plugins that are not wiki specific. The
environment variable you set is relative to the cwd (current working
directory) which appears to be wf. If TiddlyWiki cannot find the plug-in in
that folder it will look in the TiddlyWiki installation plugins folder.

Please can someone tell me if this is expected behavior and what is the
> correct method to deploy packed and unpacked plugins?
>

The only correct way to deploy packed .tid plugins is through the tiddlers
folder. TiddlerServer uses a different system to pack plugins which packs
all the tiddlers into the plugin.info file and is deployed the same as an
unpacked plugin.

Wiki folders loaded via TiddlerServer should be identical in most scenarios
to TiddlyWiki running NodeJS.


> Thanks, Gabriele
>

My pleasure
Arlen

>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdSR24wE1x7Qt_H4NUDABzuu6jzQe3dKArmzkCmhQkPEVQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to