A simple procedure to create plugins with TW+Node.JS

222 views
Skip to first unread message

Mohammad

unread,
Feb 29, 2020, 1:17:40 AM2/29/20
to TiddlyWiki
I am preparing a section in The Book by Luis on creating plugins using TW on Node.JS.
While I did by myself many times but I see the default documentation and the way https://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub explais
is confusing for beginners.

I think the procedure should be like this
  1. having install node.js
  2. having install TW on node.js
  3. create the plugin folder
  4. develop the plugin tiddlers (normal tiddlers, macros, styles, modules, ...)
  5. pack it
  6. export and distribute
The procedure SHOULD not rely on other plugins only pure TW distributed officially 

I appreciate if anybody can share a simple to understand procedure or any resources on this.


You help much appreciated.

--Mohammad


Some references

Petruschka

unread,
May 2, 2020, 3:57:24 AM5/2/20
to TiddlyWiki
Hello Mohammad!

Why node.js? I am asking because I think your "The procedure SHOULD not rely on other plugins only pure TW distributed officially" approach to help others help themselves to packaging is great. I for myself try to not use node.js on the customer desktop systems when entering a project using TW for it.

Is there a tutorial how to install node.js the easy way without admin right on Windows systems??

Mohammad

unread,
May 2, 2020, 9:41:50 AM5/2/20
to TiddlyWiki
Hi Petrushka,
 I have created some tutorial to be included in The Book of Tiddlywiki! So, this is part of that!
See the tutorials here: http://sistan.tiddlyspot.com/

Each tiddler has a prev | next at the bottom where you can follow steps in a linear manner.

Hope this help you!

Cheers
Mohammad

Mark S.

unread,
May 2, 2020, 9:48:57 AM5/2/20
to TiddlyWiki
There is a procedure mentioned in the developer wiki on how to make plugins by hand without node.js. Probably not user-friendly.

TonyM

unread,
May 2, 2020, 10:19:12 PM5/2/20
to TiddlyWiki
Mohammad,

Presumably this project is about using javascript functions building plugins?

As you may know it is quite easy to build "plugins" without javascript, basically as plugin  packages, I am working on multiple methods to do this in the single file wikis and there are lots of opportunities.

I am not expecting you do document these necessarily, but I would like to to qualify the documentation such as with 
"Building Plugins with Javascript and functions on the TiddlyWiki platform"
 
You title A simple procedure to create plugins with TW+Node.JS

Is a little misleading when I tell you a very simple method;
  • Drag and drop one or more tiddlers on a wiki including JSON files
  • Rather than import, rename the $:/import tiddler and delete all fields except plugin-type which you set to plugin
Presto a basic PLUGIN !

Regards
Tony

Mohammad Rahmani

unread,
May 2, 2020, 11:47:24 PM5/2/20
to tiddl...@googlegroups.com
Tony,
 The procedure is using node.js and it is about wikitext plugins not JS!
 It is really simple, simpler than developing in explorer!

 But you are right in the tutorial we should say it is possible to encapsulate javascripts in plugin!
 perhaps the initial idea was to write plugins in JS.

--Mohammad



Best wishes
Mohammad


--
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/267337c9-ef3b-4fa4-aa9d-cdf5860cbd82%40googlegroups.com.

Mark S.

unread,
May 2, 2020, 11:54:25 PM5/2/20
to TiddlyWiki


On Saturday, May 2, 2020 at 7:19:12 PM UTC-7, TonyM wrote:
Mohammad,

Presumably this project is about using javascript functions building plugins?

As you may know it is quite easy to build "plugins" without javascript, basically as plugin  packages, I am working on multiple methods to do this in the single file wikis and there are lots of opportunities.

I am not expecting you do document these necessarily, but I would like to to qualify the documentation such as with 
"Building Plugins with Javascript and functions on the TiddlyWiki platform"
 
You title A simple procedure to create plugins with TW+Node.JS

Is a little misleading when I tell you a very simple method;
  • Drag and drop one or more tiddlers on a wiki including JSON files
  • Rather than import, rename the $:/import tiddler and delete all fields except plugin-type which you set to plugin
Presto a basic PLUGIN !



That is really cool. If you follow the plugin naming convention, and add name, description, version and list fields, you'll have a distributable plugin.

Mark S.

unread,
May 3, 2020, 12:07:39 AM5/3/20
to TiddlyWiki
Looking at the /dev instructions, I feel there may be an error. It looks like you'll end up with a directory structure like:

TW/plugins/<your name>/<your plugin>/<your plugin>/

I think when you do the cloning, you should be in the <your name> directory, not the <your plugin> directory. Or am I misunderstanding?

Also, you don't need to build the index do you? If you run node, then inside your hosted node (e.g. 127.0.0.1:8080) you can just navigate to plugins and then export it.

Birthe C

unread,
May 3, 2020, 12:10:24 AM5/3/20
to TiddlyWiki
TonyM,

Mohammad is preparing a section in The Book by Luis on creating plugins using TW on Node.JS.
Other sections could be written by other if they so wish.

Mark S,

Exactly! Everything else will lead to confusing when sharing the TW. We can do what we want i private wikies.

Birthe

Mohammad

unread,
May 3, 2020, 12:29:47 AM5/3/20
to TiddlyWiki
Hi Birthe


On Sunday, May 3, 2020 at 8:40:24 AM UTC+4:30, Birthe C wrote:
TonyM,

Mohammad is preparing a section in The Book by Luis on creating plugins using TW on Node.JS.
Other sections could be written by other if they so wish.

Exactly! In my work all the the time I stick to Wikitext Scripting and I tried avoid JS. But more sophisticated plugins
need JS and other developer can write those parts! 

Mohammad

unread,
May 3, 2020, 12:32:19 AM5/3/20
to TiddlyWiki
Mark,
 I think at the time of writing those docs, their focus was on official plugins!
 By the way I tried in my tutorial create a step by step simple procedure!
 As you see the main point is: correct naming, folder structure, plugin.info

 So, any newbie can follow and create one!

--Mohammad

TonyM

unread,
May 3, 2020, 7:51:45 AM5/3/20
to TiddlyWiki
All,

My point was to add context to the instructions. I am fine with No JavaScript instructions, just say its "Wiki text and macro plugins" or what ever you see fit. But so people know what it is talking about and the scope of the instruction.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages