Installing plugins via drag and drop in nodejs

158 views
Skip to first unread message

demon...@gmail.com

unread,
Sep 3, 2020, 8:49:25 AM9/3/20
to TiddlyWiki
So I have my nodejs server up and running, but I did not want to start an entirely new wiki, instead I wanted to import my old wiki and continue using that. I imported it via just drag and dropping my .html file onto the newly made empty wiki. It imported everything just fine and everything seems to work ok.

However, I noticed that installing plugins in nodejs server should not be done by drag and dropping them as individual tiddlers but instead you should make plugins folder in the server and put them there and tell in the tiddlywiki.info file what plugins to load. It is said that:

> Note that including a plugin as an ordinary tiddler (e.g. by dragging and dropping a plugin into the browser) will result in the plugin only being active in the browser, and not available under Node.js.

So what does this actually mean? All my old plugins were installed this way when I was not using nodejs. They still seem to work fine. Should I remove all my plugins installed with drag and drop and install them manually as per the link?

Mark S.

unread,
Sep 3, 2020, 10:56:10 AM9/3/20
to TiddlyWiki
I think it means there some plugins meant for node.js that need to be installed in a directory (maybe because they need to communicate directly with the operating system).

For most 3rd party plugins I think you're OK with d&d. But if you have a plugin that needs to directly communicate with the OS or over the internet, then you will need to install local plugin directories.

If you have official plugins, then you can "install" them just by listing them in the tiddlywiki.info file. You do not want there to also be a drag-and-drop plugin version of them because the d&d version will block the latest copy of the official version. The idea is that your official plugins will automatically be upgraded on node.js when you upgrade your tiddlywiki installation on node.js.

Having said that, if you're using code-mirror, and your drag-and-drop version seems to be working, maybe just stick with it for the current generation. It seemed to me that there was some internal inconsistency with the next gen of code-mirror. Whenever I tried to do the official install, things broke. But that's just my thinking.


Good luck!

P M

unread,
Sep 3, 2020, 11:01:22 AM9/3/20
to tiddl...@googlegroups.com
Ah I see that does make sense. I think then I'll stick with drag and drop for the time being. 

Thanks! 

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/bYH7e50PkhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/67f67a49-d393-4750-953d-5591f6c135d7o%40googlegroups.com.

TW Tones

unread,
Sep 3, 2020, 7:56:07 PM9/3/20
to TiddlyWiki
Mark,

That is possibly the clearest description so far. We need to document this a bit better.

I admit I am no expert in this yet, and I hope if what I state is incorrect someone will contradict me.

I would add to your points, as I understand it, that if installed in node apparently they are available to all wikis within Node such as under Bob, but installed by Drag and drop they become tiddlers installed in the specific wiki.

You can see that except for the exceptions Mark mentions, drag and drop can be an intentional approach to installing a different set of plugins in different wikis.

Despite this I am not sure what happens to to make correctly installed server plugins visible in the wikis below.

Regards
Tony

Werner

unread,
Sep 4, 2020, 6:21:31 AM9/4/20
to TiddlyWiki
From my limited experience... while it is possible to install a plugin on Node.JS via D&D, and it seems to work properly, the plugin will only be available on the wiki it has been installed on. If you choose the more cumbersome way, as recommended for Node.JS, the plugin will be available on every wiki that is served from this Node.JS TW server. So, while the D&D installation will be fully sufficient, if the wiki concerned is the only one you intend to run, the Node.JS installation looks like the more sustainable method.

On a side note: it is possible to manually convert a plugin that is only available for D&D to a server-suitable version. At least, if it's a wikitext-only plugin. I have successfully done this for A. Aldrich's Tables plugin.

Best, Werner

Pit.W.

unread,
Sep 4, 2020, 1:56:37 PM9/4/20
to tiddl...@googlegroups.com

This was REALLY helpful"

Much obliged,

Pit.W

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4c65b5a6-ddd1-446a-aac1-48065e20209an%40googlegroups.com.


_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de


Mark S.

unread,
Sep 4, 2020, 4:27:02 PM9/4/20
to TiddlyWiki
Let me add, that there are two ways to add a plugin folder.

The first is to add it to just a single wiki, in the plugins folder of your tiddly data folder.

The second is to add it to your node.js master copy of tiddlywiki.

The advantage of the first method is that the plugins will continue to be there as you upgrade, and it's pretty easy.

The advantage of the second method is that once you have the plugins in place, they are available to all your wikis just by insert some lines into tiddlywiki.info.

The disadvantage of the second method is that you have to find where your master copy of TW is (On Windows, the path to the default TW version is buried pretty deep.), and, possibly, your plugins won't survive when you upgrade (don't know for sure on this point.) Certainly if you relink to a different TW directory structure, your personal plugins aren't going to be there automatically. 

TW Tones

unread,
Sep 5, 2020, 2:33:37 AM9/5/20
to TiddlyWiki
Mark,

Are there instructions anywhere to take an in wiki plugin and make it a server plugin (file?).

Regards
Tones

Werner

unread,
Sep 7, 2020, 6:36:23 AM9/7/20
to TiddlyWiki
Tony,

here's how I did it: 

- D&D installed the plugin in question. In my case, it was A. Aldrich's Tables plugin. 
- The result was two files in my tiddlers directory: $__plugins_aaldrich_tables.json and $__plugins_aaldrich_tables.json.meta. 
- Under my c:\<username>\appdata\roaming\npm\node-modules\tiddlywiki\plugins directory, I now created two directories aaldrich and aaldrich\tables.
- Copied the .json file into the latter and renamed it to plugin.info
- Opened the json.meta file and copied the contents ahead of the "tiddlers" key in the plugin.info file. 
- Added proper JSON formatting (quotation marks and commas) to the new entries. If you have any wikitext plugin installed, you can use its plugin.info file as a template.
- Deleted the plugin from my wiki to get rid of the two above files
- Added the missing plugin information in tiddlywiki.info in my wiki's home directory. 
- Stopped and restarted the server. 

Voilà. 

Best, Werner

TW Tones

unread,
Sep 7, 2020, 7:48:09 AM9/7/20
to TiddlyWiki
Thanks werner. I will build my own notes after trying this thanks

Regards
Tony

Reply all
Reply to author
Forward
0 new messages