An Easy Way to Create and Modify Plugins

455 views
Skip to first unread message

Andreas Hahn

unread,
Apr 29, 2015, 4:22:43 PM4/29/15
to tiddl...@googlegroups.com
Hi,

I have noticed that in the past couple of days, people took an interest
in bundling together content into either plugins or "bundles" consisting
of a json file with multiple tiddlers in it. Since sometimes however,
you want the management capabilities of a plugin, I have created a small
GUI extension to the control panel that lets you create and modify
plugins more easily.
The basic idea was to make the plugin creation and editing process
similiar to the tip Greg Davis shared a couple of days ago [1]. Creating
this already payed off for me, since it enabled me to make a bunch of
modifications to a variety of plugins and repackage them very easily.
Also it removes one of the hurdles of developing in the browser.
Having said that, even with this plugin, a potential user will still
have to have some knowledge of filters, so it might not be for
everybody. (Although I guess the search could be improved in one of the
next versions)

You can take a look at my example wiki here:
http://twguides.org/wiki/tinka.html (Let me know if the GUI is not as
self explaining as I have hoped )

Also there is a corresponding article on TWGuides:
http://twguides.org/tinka.html

/Andreas

[1] https://groups.google.com/forum/#!topic/tiddlywiki/R5sSkEOCilQ

Jed Carty

unread,
Apr 29, 2015, 4:58:50 PM4/29/15
to tiddl...@googlegroups.com
That looks really useful, particularly for small bugfixes. Thanks!

Greg Davis

unread,
Apr 29, 2015, 9:16:44 PM4/29/15
to tiddl...@googlegroups.com
Wow! It looks very well thought out. About the only thing I would suggest might be a link to some info, like http://tiddlywiki.com/#PluginMechanism , for those that are new to building plugins. This will be great for a chance to experiment without setting up node.js. Thanks!

Greg

Andreas Hahn

unread,
Apr 30, 2015, 7:05:13 AM4/30/15
to tiddl...@googlegroups.com
Hi Greg and Jed,

thanks for the feedback. I added some documentation which mainly
consists of pointers to the official documentation for further
information about plugins and filters (as suggested).
Furthermore, I changed the following things:

* The list of plugin tiddlers is now hidden by default, since some lists
can get very long.
* Added a different search option (default/filter)
* Improved Documentation slightly
* Added a backup option, so a plugin can be backed up before repackaging
to avoid data loss.

Especially the option to use the "default" search lowers the entry
barrier to the plugin, I think.
The new version is, again, available at: http://twguides.org/wiki/tinka.html

/Andreas

Jeremy Ruston

unread,
Apr 30, 2015, 10:48:04 AM4/30/15
to TiddlyWiki
Hi Andreas

That's a really nice piece of work, congratulations. It looks great too.

Seeing it reminds me that I'd like to try to make it a goal for 5.1.9 to get third party plugins such as this listed in the plugin library. I'll open a ticket for discussion about how we might do that.

Best wishes

Jeremy.





--
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 post to this group, send email to tiddl...@googlegroups.com.
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/55420C5C.8070907%40googlemail.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Felix Küppers

unread,
Apr 30, 2015, 11:17:45 AM4/30/15
to tiddl...@googlegroups.com
Cool stuff

Ton Gerner

unread,
May 15, 2015, 12:41:54 PM5/15/15
to tiddl...@googlegroups.com
Hi Andreas,

In the past struggling with making plugins in the browser with the experimental "How to create plugins in the browser", which uses the developer console, I started a few days ago with your Tinka plugin.
Wow, now it is very easy to create plugins and update plugins.
Thank you very much for this Tinka plugin.

What I miss in the metadata (see http://tiddlywiki.com/#:PluginMechanism):
Source: source URL of the plugin
Name: Name of the theme (only for themes)

'Source' is minor but 'Name' is required for a theme (otherwise you cannot select the theme).

Cheers,

Ton

Andreas Hahn

unread,
May 16, 2015, 8:15:26 AM5/16/15
to tiddl...@googlegroups.com
Hi Ton,

thank you for you feedback, it is indeed something I have not noticed so far, as I haven't actually created a theme with Tinka yet. I will work on including those fields, as well as adding a few new features and I will post an updated version of the plugin later today.


Thanks again for reporting the issue,
/Andreas


Am 15.05.2015 um 18:41 schrieb Ton Gerner:

Andreas Hahn

unread,
May 16, 2015, 8:17:58 AM5/16/15
to tiddl...@googlegroups.com
One addition:

I left the source field out in the first version, because I didn't think much of it (everyone uses readme's anyways), however seeing the recent developments with the plugin-repo system, I hope that a proper update mechanism will be implemented soon and the 'source' field will be a important component for that.

/Andreas

Andreas Hahn

unread,
May 18, 2015, 6:50:49 AM5/18/15
to tiddl...@googlegroups.com
Okay, I updated the Tinka version on the site, the fields are now
present as well as some other stuff:

* The metadata section now include edit fields for the `name` and
`source` fields.
* The default search box now only searches for title matches.
* Backups can now be exported/downloaded.
* Backups can now be restored and made active again. If another version
of the plugin is already active, the option is given to back it up,
before restoring the backup.
''Warning: For this mechanism to work, there has to be an
'original-title' field present in the backup tiddler. This is
automatically added by Tinka, however earlier versions of Tinka did not
add this field. If you want to restore a backup from an earlier version
of Tinka, you will have to add the 'original-title' field manually and
populate it with the former title of the plugin tiddler, in order for
the restore function to work.''


As usual you can get the plugin here: http://twguides.org/tinka.html

/Andreas

Ton Gerner

unread,
May 18, 2015, 8:46:04 AM5/18/15
to tiddl...@googlegroups.com
Hi Andreas,

Thanks.
I'll have to investigate the backup possibilities but that looks very promising.

Cheers,

Ton

Danielo Rodríguez

unread,
May 18, 2015, 9:29:29 AM5/18/15
to tiddl...@googlegroups.com
The backup things seems to be cool not only for plugins!

Mat

unread,
Jun 4, 2015, 3:12:54 AM6/4/15
to tiddl...@googlegroups.com
@Andreas

First; thank your for this creation!

Here is some feedback:

  • I don't think the "Create New Plugin" button/content should be under the tab "Installed Plugins" but instead warrants a tab of its own.
  • As someone new in the plugin packers business, I am a bit uncertain what happens to my original tiddlers. It seems they are fully replaced with the created plugin. This makes it difficult to make changes and I would strongly prefer that the original tiddlers were left intact.
  • "Plugin title" appeared clear... until I read (full "path"). I suggest using the same technique used in the standard "New Tiddler", i.e add a faint gray "disappear-on-type" instruction in the text field saying perhaps "e.g $:/.../myPlugin". (...if this, in deed, is what you mean).
  • ...further, I propose moving "Name:" to first position in list, then "Plugin title" and then "Author". 
  • For "Plugin type" I would love to get a drop down menu with predefined suggestions in addition to the possibility to make up a type. I propose "predefined suggestions" as part of a greater "community issue" to standardize denominations and terminology for the coming Federation. I'm guessing this will become important then in order to find things (or am I wrong?) Your whole plugin packer already does a wonderful job for creating a standard for the meta data labels (e.g "Author" as opposed to "Creator", "Plugin-maker" etc), not to mention the fact that your plugin encourages people to actually add this data to begin with.
  • "Description"; It is not unlikely that the plugin author finds the plugin to be more "obvious" than the later users. For this reason it is, IMO, desirable to really encourage the author to describe it properly, and the current field is IMO too small for this. (An option would perhaps be a field with "Link to documentation" or some such.)
  • "Version"; do I understand it right that typing in "1" or "0.1" should automatically be converted to "0.01"? (I made my first plugin the other day and proudly tried to set it to version 1.0 but this was converted. Maybe there are standards for versioning that I'm not aware of?)

Your creation is what I classify as "infrastructure for sharing" - extremely important for the TW project IMO. It is worth considering that there is, for sure, a lot of brilliant stuff created in the TiddlyVerse that is never shared because it is a bit of exrtra work to do so. To absolutely minimize this barrier must be one of the most important things we can do.

...This is why I, in a recent hangout, tried to propose that your plugin packer or similar becomes part of the standard distribution. I mistakenly referred to the latter as "core" which I feel confused my proposal. I understand people feel differently about this, but here's a thought; would it be possible to make your packer so that it could be included on tw.com, as a service there? I.e so that a user could e.g drag or otherwise import tiddlers his own tiddlers into it and get a plugin in return to drag back to his own TW... or even upload directly from tw.com to e.g a tiddlyspot? 

Ok, again, thank you so much for this Andreas.


<:-)

Pit.W.

unread,
Jun 5, 2015, 10:22:47 AM6/5/15
to tiddl...@googlegroups.com
Am 29.04.2015 um 22:22 schrieb Andreas Hahn:
a small GUI extension

Comment:
in my opinion a brilliant piece of work, especially for people who work with mutiple tiddlywikis. Its a real game changer, because it allows to put all the tiddlers for a specific solution (like a person directory, a reading list of travel guides, geographic definitions, historic events....) into one plugin each.

Then I want to plan a travel and I create a dedicated new TW, drag in the plugins I need, do the research on the contents, put it on the usb-stick around my neck and after I return - I dump it into my main TW under node and everything falls into place.

"A small extension to the GUI a giant leap for the user community."

Thank You!

It can be found here http://twguides.org/wiki/tinka.html 


Mat

unread,
Jun 8, 2015, 12:07:00 PM6/8/15
to tiddl...@googlegroups.com
An addition to my feedback two posts up;

  • Presumption of how a plugin is made up and how Tinka creates one: the plugin is created by copying+converting multiple tiddlers into a json tiddler. At the same time, the original tiddlers are converted into being shadow tiddlers.
    Feedback: In creating different variants of a plugin, which I'm just trying to do, I find it would be valuable to access tiddlers that have previously been converted to shadow tiddlers. (Specifically, I'm creating a variant of the SideEditor and it uses all the tiddlers of the current variant but also some new ones.) If possible, I would like an option to include shadow tiddlers in the Tinka search tool. (...or is a tiddler somehow critically changed as it is converted into a shadow tiddler, making it unusable for plugin content?) 
  • Observation: When developing my plugin, I need easy access to the tiddlers involved so they are not prefixed with $:/. This, however, means that when the plugin is created, they are hidded (shadowed) but with these titles... which makes them "odd" in the shadow list and, more unfortunate, they get placed (alphasorted) to the very bottom of the listing. If someone is looking around for where these tiddlers are hiding, then being at the very bottom of a long list is of course not good.
    Feedback: I'm not certain it's a "Tinka issue" as much as a workflow issue, but I would like to use common titles during development but have prefixes $:/ added as they are converted into shadow tiddlers. Maybe this is something Tinka could offer? 

Again, thank you for this Andreas. Very valuable!

<:-)

Andreas Hahn

unread,
Jun 8, 2015, 4:42:39 PM6/8/15
to tiddl...@googlegroups.com
Hi Mat,

thank you very much for your feedback, you raise some important points and a new Tinka version with quite a few changes is already in the making.
Here are my thoughts:


  • I don't think the "Create New Plugin" button/content should be under the tab "Installed Plugins" but instead warrants a tab of its own.
Yes, you are correct, it feels better to put it there, so this will be changed in the next version.



  • As someone new in the plugin packers business, I am a bit uncertain what happens to my original tiddlers. It seems they are fully replaced with the created plugin. This makes it difficult to make changes and I would strongly prefer that the original tiddlers were left intact.
  • Presumption of how a plugin is made up and how Tinka creates one: the plugin is created by copying+converting multiple tiddlers into a json tiddler. At the same time, the original tiddlers are converted into being shadow tiddlers.
    Feedback: In creating different variants of a plugin, which I'm just trying to do, I find it would be valuable to access tiddlers that have previously been converted to shadow tiddlers. (Specifically, I'm creating a variant of the SideEditor and it uses all the tiddlers of the current variant but also some new ones.) If possible, I would like an option to include shadow tiddlers in the Tinka search tool. (...or is a tiddler somehow critically changed as it is converted into a shadow tiddler, making it unusable for plugin content?) 
Observation: When developing my plugin, I need easy access to the tiddlers involved so they are not prefixed with $:/. This, however, means that when the plugin is created, they are hidded (shadowed) but with these titles... which makes them "odd" in the shadow list and, more unfortunate, they get placed (alphasorted) to the very bottom of the listing. If someone is looking around for where these tiddlers are hiding, then being at the very bottom of a long list is of course not good.
Feedback: I'm not certain it's a "Tinka issue" as much as a workflow issue, but I would like to use common titles during development but have prefixes $:/ added as they are converted into shadow tiddlers. Maybe this is something Tinka could offer? 


This is partly due to the way plugins work, namely the tiddlers belonging to this plugin are stuffed into a JSON tiddler and become shadows. Also I am afraid that I would like to do it this way, as ideally the tiddlers in the plugin are the ones that get executed on loading, as this is necessary to test if the plugin is working. Copying those tiddlers and having them both as shadows and as normal tiddlers may cause all kinds of problems.

The general philosophy is that all the tiddlers belonging to the plugin should be shadow tiddlers, except when you are in the middle of making changes, in which case a selected few are overwritten by normal tiddlers. Also, you can get a list of all the tiddlers in the plugin by just clicking on the plugin name in either the Tinka tab or the normal Plugin tab in the Control Panel.

I do however agree with you, that it can be cumbersome to navigate to the tiddlers. For that, I would like to add something like an edit-mode, where a new tab is attached to the sidebar that displays all the relevant tiddlers for the plugin for easy access.

The variants is something I did not think about when I removed the capability of the "default" search to search for shadows. I will have to think about this one and maybe add a third tab to the searches that enable a search for shadow tiddlers. For now however, the mechanics to create variants is via the backup functionality:

- You create your plugin
- Then you back it up
- Make the changes to create a new variant
- Pack the changes into the plugin, maybe add something to the version to mark is as a variant (e.g. "0.0.2-variantA")
- Repeat for all the variants. If you want to make one active again, simply restore it via the Backup-tab, the currently active one will be backed up by default (if not already)

This way you will also only have 1 variant active at any given time (which sounds like a good idea).

As for the creation ($:/-prefix) process: Since plugin tiddlers can have interdependencies (and these are usually by title), it can get very difficult to near impossible to implement a mechanic that changes the tiddlers titles automatically while keeping all the links intact. Therefore, when making a plugin, the tiddler titles pretty much have to be the final titles. Again the above mentioned "edit-mode" with the sidebar tab might make this process easier.


  • "Plugin title" appeared clear... until I read (full "path"). I suggest using the same technique used in the standard "New Tiddler", i.e add a faint gray "disappear-on-type" instruction in the text field saying perhaps "e.g $:/.../myPlugin". (...if this, in deed, is what you mean).
You are right, this might be confusing, I will write a simple helpfile that explains all of the metadata field involved to make this more clear. Also, "Plugin title" might change to "Plugin path" or maybe "Plugin tiddler" as it really doesn't have much to do with the title of the plugin that the user perceives.


  • ...further, I propose moving "Name:" to first position in list, then "Plugin title" and then "Author".
This field only applies for theme plugins, it does not have any effects on the name of the plugin for normal plugins (if I am not mistaken). Again, this has to be made clear somehow, I am not sure how exactly though, as I would like to keep all possible metadata fields displayed at any time, even though some of them might not apply to the specific type of plugin currently being edited.


  • For "Plugin type" I would love to get a drop down menu with predefined suggestions in addition to the possibility to make up a type. I propose "predefined suggestions" as part of a greater "community issue" to standardize denominations and terminology for the coming Federation. I'm guessing this will become important then in order to find things (or am I wrong?) Your whole plugin packer already does a wonderful job for creating a standard for the meta data labels (e.g "Author" as opposed to "Creator", "Plugin-maker" etc), not to mention the fact that your plugin encourages people to actually add this data to begin with.
I fully agree, I will change this for the next version.


  • "Description"; It is not unlikely that the plugin author finds the plugin to be more "obvious" than the later users. For this reason it is, IMO, desirable to really encourage the author to describe it properly, and the current field is IMO too small for this. (An option would perhaps be a field with "Link to documentation" or some such.)
Although this encourages to type in a longer text, this is actually the "name" of the plugin that will be displayed in the plugin tab. Therefore this isn't much of a description, but more of a descriptive title. I am not sure why TiddlyWiki does it this way (instead of using the "name" field), but that is how it works as far as I can tell (very confusing, I know).
Making it double the current length is probably still a good idea though.



  • "Version"; do I understand it right that typing in "1" or "0.1" should automatically be converted to "0.01"? (I made my first plugin the other day and proudly tried to set it to version 1.0 but this was converted. Maybe there are standards for versioning that I'm not aware of?)

TiddlyWiki seems to only accept version-numbers in this format:  N.N.N-XXXXX  where N is a number and X can be letters (and maybe numbers too). therefore 1 is automatically converted to "0.0.1". "1.0.0" would work the way you would expect. Again, this probably has to be explained (and I will include this in the help-tiddler).

I apologize that this answer became very lengthy, still I hope I was able shed some light on a few things. Again thank you very much for your feedback, I will be sure to include the points you mentioned in the next Tinka version.

/Andreas

Mat

unread,
Jun 9, 2015, 7:37:53 AM6/9/15
to tiddl...@googlegroups.com
Andreas,


I apologize that this answer became very lengthy,...

On the contrary, I really appreciate you taking the time to go through my feedback.


New little discovery; There is a state tiddler missing a colon - $/state/popup/tinka-create


Having now gone through the process again (for SideEditor ver 0.2) I must restate that I do still find the naming issue a big problem. If I prefix with "$:/" they hide during development, but if I intend to change it later then I must also change any references to these titles. And if I don't prefix them, then they look odd in the shadow lists and I also realized that tiddlers that become overwritten (such as the tiddler holding the temporary position values in SideEditor), then these show up in the regular tiddler lists... so those I must prefix. Not a Tinka issue, but just maybe tiddlers should be possible to shadow from tagging?


Another issue;

I didn't want the Tinka plugin installed on the SideEditor tiddlyspot so deleted the plugin. However, this still leaves all the shadow tiddlers. I'm guessing this is not due to Tinka itself. Maybe I just don't know how to uninstall a plugin... and this is where it just might be a Tinka issue; In using Tinka it is not unlikely that people create a plugin that they wish to re-make ("oh, I forgot to include tiddler X", "ah, I should have updated tiddly Y before I packaged", etc). For this reason, it would be valuable with a "complete plugin delete" feature in Tinka that deletes the plugin and the shadow tiddlers. Maybe user could get a checkbox list for which tiddlers to delete (+a "select all" button). 


I do however agree with you, that it can be cumbersome to navigate to the tiddlers. For that, I would like to add something like an edit-mode, where a new tab is attached to the sidebar that displays all the relevant tiddlers for the plugin for easy access.

To the sidebar? You mean that pops up only when you're in the Tinka Controlpanel tab then? (a bit like the Sidebar Search tab idea?)


TiddlyWiki seems to only accept version-numbers in this format:  N.N.N-XXXXX 

For the latest version, I tried putting in "0.2.0" and it was converted into "0.2.1" which I manually had to change in the resulting plugin after... 


<:-) 

Jeremy Ruston

unread,
Jun 9, 2015, 12:51:05 PM6/9/15
to TiddlyWiki
> TiddlyWiki seems to only accept version-numbers in this format:  N.N.N-XXXXX 

TW5 uses "semantic versioning" 2.0 - it's a specific set of rules governing version numbers:


Best wishes

Jeremy.


--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.

Andreas Hahn

unread,
Jun 9, 2015, 4:30:49 PM6/9/15
to tiddl...@googlegroups.com
Hi Mat,


New little discovery; There is a state tiddler missing a colon - $/state/popup/tinka-create
Whoops, I never noticed that, thank you !


Maybe user could get a checkbox list for which tiddlers to delete (+a "select all" button).
If I am not mistaken Tinka already has a remove feature to remove individual tiddlers from a plugin (there is no select all button though). If you want to delete the entire plugin, there is no reason to use Tinka, just open the plugin tiddler by clicking on its name and delete it like any other tiddler.


To the sidebar? You mean that pops up only when you're in the Tinka Controlpanel tab then? (a bit like the Sidebar Search tab idea?)
Possibly, although I was thinking more along the lines of a checkbox for each plugin, that enables the tab.


For the latest version, I tried putting in "0.2.0" and it was converted into "0.2.1" which I manually had to change in the resulting plugin after... 
TiddlyWiki increases the version number after each (re-)packaging process. Therefore I tend not to care about the last version number, as it only serves as a number to distinguish the different packaging operations. Before release then, I set the version number to the number I want (you can edit the metadata of a plugin without needing to repackage).


Also thanks @Jeremy for the link, things make more sense now =).

/Andreas

Mat

unread,
Sep 12, 2015, 9:06:36 AM9/12/15
to TiddlyWiki
Dear Andreas

do you think you could put up Tinka on github? It would be much easier to post issues which in turn would provide a great overview of stuff AND it would enable others to make pull requests.

Thanks. 

<:-)
Reply all
Reply to author
Forward
0 new messages