Plugin Packaging Question

53 views
Skip to first unread message

TonyM

unread,
Jul 9, 2020, 10:29:27 PM7/9/20
to TiddlyWikiDev
Folks,

I build a lot of macros I do not publish as plugins yet, However eventually I will publish a library. 

Because of this I create tiddlers of the form $:/PSaT/projectname and tiddlers below that.

I hope to automate the movement of a project into a plugin, so this is an important question I must answer now.

My Question is If I start publishing plugins can I keep the majority of the tiddlers in this namespace or must they all become $:/plugin/PSaT/projectname and tiddlers below that?

Thanks in advance
Tony

Mat

unread,
Jul 10, 2020, 1:11:52 AM7/10/20
to TiddlyWikiDev
You're asking about naming shadow tids: There's a convention, probably mostly for practical reasons, to keep the plugin title as prefix but shadows can have any name. This makes sense because you might want a readily editable tiddler that is really an overwritten shadow but you don't want the $:/ prefix.

<:-)

PMario

unread,
Jul 10, 2020, 3:48:43 AM7/10/20
to tiddly...@googlegroups.com
Hi Tony,

The namespace for plugins is:
 - $:/plugin/<publisher>/<plugin-name>/<file-name> or
 - $:/plugin/<publisher>/<plugin-name>/<dir>/<file-name>

eg: $:/plugin/wikilabs/bundler/...


In my personal and opinionated setup, there is an additional edition for every plugin. This edition is meant to be the "extended" documentation. Minimal docs also comes with the plugin as. readme.tid.

Important tiddlers, that every plugin should have are: plugin.info, license.tid, history.tid and readme.tid.

At the very beginning I did use my edition template: https://github.com/wikilabs/editions/tree/master/edition-template to start a new edition. Now I'm using one of my existing edtions that already contains the "important" stuff, that works for me ;)

Same goes for plugins. Just use an existing plugin eg: bundler ... remove the stuff that's not needed. ..All of it. .. Only keep the stuff that you need.

Imporant: Change copyright and license ... Take care all links go to _your_ repos and pages.

have fun!
mario

PMario

unread,
Jul 10, 2020, 3:56:05 AM7/10/20
to TiddlyWikiDev
Hi Tony,

There is 1 thing, that I think is important for you now. ... You'll need a "full blown" nodejs based development environment, to be efficient.

This may be "scary" at first, but imo will save you a lot of time in the long run.

Just a thought.
mario

TonyM

unread,
Jul 10, 2020, 4:27:42 AM7/10/20
to TiddlyWikiDev
Folks

Thanks for the feedback. I have a set of standards I use to build all my projects, only one ever became plugin, but I have dozens using the following method, which made sense for non plugin macros.

To illustrate;

The set of project tiddlers look something like this;


To make a plugin I was hopping I can add something like 
$:/PSaT/focus-tiddler/readme 
$:/PSaT/focus-tiddler/plugin 
$:/PSaT/focus-tiddler/license
$:/PSaT/focus-tiddler/history


Then make a tool to rename and pack the essential $:/plugin tiddlers from above
$:/plugin/<publisher>/<plugin-name>/<dir>/<file-name>

$:/plugin/PSaT/focus-tiddler/readme 
$:/plugin/PSaT/focus-tiddler/plugin 
$:/plugin/PSaT/focus-tiddler/license
$:/plugin/PSaT/focus-tiddler/history

But, can the balance of tiddlers remain in my $:/PSaT/projectname/[folder/]tiddlername namespace?

Then references in the code to $:/PSaT/projectname name tiddlers will not need rewriting

I expect some changes may be needed to access shadow tiddlers that were not shadows before packing into the plugin
  • Can any one guide me on the differences between tiddler and shadow in this circumstance (if any)?
I have not detailed it here, but I have a project tool that has the template for tiddlers to include in a project, but with the plugin also the for the the licence etc.., so I write it once 

For me the question is can I accommodate these tiddlers in the alternate name space or must I pivot and change the whole process to live in the $:/plugin/PSaT/project namespace? Which I really do not want to do.

Regards
and thanks for you rime
TW Tones

Saq Imtiaz

unread,
Jul 10, 2020, 4:43:17 AM7/10/20
to TiddlyWikiDev
Just FYI; node.js users of TiddlyWiki will expect a "folder version" of your plugins, that is a directory structure with one tiddler per file. Working with the correct directory structure and tiddler names from the beginning will make your life easier long term. This ties in with what Mario mentions about a node dev environment.


PMario

unread,
Jul 10, 2020, 4:49:30 AM7/10/20
to tiddly...@googlegroups.com
On Friday, July 10, 2020 at 10:27:42 AM UTC+2, TonyM wrote:


To make a plugin I was hopping I can add something like 
$:/PSaT/focus-tiddler/readme 
$:/PSaT/focus-tiddler/plugin 
$:/PSaT/focus-tiddler/license
$:/PSaT/focus-tiddler/history

I think, titles looks good, except plugins _must_ start with $:/plugin/ prefix

You can play with the physical directory structure later, without changing the titles. eg: my readme and others go to the /system/ dir, to have the out of the way. They are changed seldom.

$:/config/xxxx is ok, _if_ it becomes a core configuration.

  • If it is yours it should be $:/config/PSaT/number-of-jump-tiddlers _if_ it is important for more than 1 of your plugins.
  • If it is a plugin specific setting it is $:/config/PSaT/<plugin-name>/number-of-jump-tiddlers if it should be more visible in the config namespace.
  • If it is plugin for your eyes only it may be: $:/plugin/PSaT/<plugin-name>/config/number-of-jump-tiddlers

otherwise users may think it is a standard setting available in every empty.html. ... but it's not. That's confusing.

-m

TonyM

unread,
Jul 10, 2020, 4:50:23 AM7/10/20
to TiddlyWikiDev
All, 

A Node Dev environment sounds scary,

I will reconsider after reviewing Mario's videos and notes. 

If its documented anywhere please let me know.

Thanks all
Tony

Saq Imtiaz

unread,
Jul 10, 2020, 4:53:33 AM7/10/20
to TiddlyWikiDev
It's really no different from using TiddlyWiki on node. I haven't used Bob but I imagine that could be used as well.
Reply all
Reply to author
Forward
0 new messages