Gatha Plugin: Experimental Release

Gatha Plugin Maker

Create and distribute Tiddlywiki plugins in browser

Gatha [2] is a new tool to create in the browser plugins of different types, including

  • standard plugins, themes, and language
  • custom media plugin (proposed by @pmario) like
    • lectures
    • books
    • presentations
    • brochures
    • pamphlets
    • audios

Demo and Code

Warning: This is the first experimental release! Do not use it with any valuable data!

Credit: Gatha is inspired by ThirdFlow (TheDiveO )

Important: Gatha is a plugin written in PURE wikitext! Zero JS! Zero Sugar :wink:

References

[1]. Proof of Concept: Gatha a Plugin Maker and Content Manager - Plugins - Talk TW (tiddlywiki.org)
[2] Gatha (Zoroaster) - Wikipedia

Note

The Experimental release suitable for standard plugins! Stay tuned for next release…

Releases

  • Release 0.6.0 beta - 2022.02.04 (minor issues fixed)
  • Release 0.7.0 beta - 2022.02.06 (see bug fixes)
  • Release 0.7.2 beta - 2022.02.08 (see bug fixes)
4 Likes

With Gatha, every newbie can make Tiddlywiki plugin! :wink:

1 Like

Visual Tutorial

Gatha on sidebar

Create a new plugin

A Draft plugin

Add new items (tiddlers: macro, css, template, …) to your plugin draft

Gatha supports boilerplate tiddlers (readme, license, history,…)

Add macros, css, templates, etc …

img_918_msedge

Add extra tiddlers (which are not in plugin namespace)

img_916_msedge

Export plugin when finished

img_921_msedge

Exported plugin

  • the file name composed of
    • publisher name (for example kookma)
    • plugin name (for example bahar)
    • plugin version (e.g v1.5.12)
    • date of release e.g 20220203

Have several draft plugins at the same time

4 Likes

Comprehensive, great tutorial.

:trophy:

1 Like

I want to become a newbie again.

Seriously, this looks great! Congratulations. I will try it out as soon as possible.

3 Likes

Hi Thomas,
Thank you! I could not set the color of svg in buttons in sidebar! I assume a muted is used that set from palette!

Also the first release is optimized for standard plugin! I hope in the next releases I can add

  • create media plugin
  • export as a zipped folder to be used with Node.JS
  • export demo.html (empty.html+selected tiddlers+ plugin)

I would appreciate to have your inputs!

Cheers
Mohammad

1 Like

Fantastic! It took two minutes only to create a first sample plugin.

I will try again another time and look at it with a beginner’s eyes then.

Tell me which button svg you want to target with CsSS and I might find a hack for that.

Cheers, t

2 Likes

This is a super useful plugin with great UX. I love how it uses the right sidebar and how easy it is to drag and drop tiddlers to the new plugin.

1 Like

The buttons for create plugin, and edit extra tiddlers.
I have only use three buttons. They should follow palette colors, I have not set any color in Gatha.
If you notice, they are darker.

Here’s an idea, the “hack” works for me. It targets a class .tc-timeline – why is this present in your sidebar?

/* hack for the new plugin button */

.tc-timeline button svg {
   fill: <<colour sidebar-controls-foreground>>;
}

/* probably a better solution */

.ga-sidebar button svg {
   fill: <<colour sidebar-controls-foreground>>;
}

/* use type text/vnd.tiddlywiki for your styles tiddler */

Probably you could put your sidebar in a container div with class .ga-sidebar for example and target all your buttons with one CSS rule like in my second example.

Important: If you use the colour macro to fetch palette colors, then your style tiddler must use the right type as the last CSS comment says.

Hope that helps.
Cheers, t

By the way: Hacking someone elses plugins is fun too. Do you have plans to allow “importing” of existing plugins?
(Of course I would import my own existing plugins first.)

Thank you Thomas!
I will update you with result!

Best wishes
Mohammad

This solution works like a charm! I pushed another update!

1 Like

This is exciting! You can go ahead and let me know how you did that!

But what I do is:

  • drag and drop a plugin (e.g. Shiraz)
  • open the plugin in edit mode
  • add the filed plugin-draft
  • save it again

Then it magically appears as a Gatha tab! :wink:

1 Like

It seems if you import a packaged plugin, you need to extract shows! I think a load button or import button may works here!

1 Like

Sorry, I forgot the hover state. You will have to add


.ga-sidebar button:hover svg {
   fill: <<colour sidebar-controls-foreground-hover>>;
}

Did you ask how I found out? I inspect other buttons in the sidebar like the new tiddler button and then search for the definition in the source of the vanilla theme:

1 Like

@Mohammad … Very well executed! …

So we only need a “top level” tab in the TW core that works with your plugin as suggested by Jeremy at: https://github.com/Jermolene/TiddlyWiki5/discussions/5462#discussioncomment-328360

We should extend that discussion at GitHub and not here.

As said: Well done!

4 Likes

@Mohammad thanks once again as you do something I intended to do “one day” and additional innovations.

I have a lot of solutions developed under $:/PSaT/projectname/various which I have not turned into plugins for which I believe I need only rename and relink them before packaging. Hopefully I will soon publish a lot more as plugins.

Please use the following as you wish and don’t feel pushed to include the following ideas.

Question(s) and thoughts;

  • What does “Gatha” mean?
  • Why are you hiding so many fields from the editor?
    • One of my solutions makes use of the source field but this is hidden from the editor
    • Perhaps a settings tiddler in the plugin that allows these to be toggled?
  • Typical plugin tiddlers,
    • In the past I have seen a “macros” tiddler rather than one per macro
    • I also commonly see settings/configuration/config, usage
  • Perhaps with relink installed we may be able to rename existing tiddler into the plugins namespace to have them updated and added to the plugin.
    • I am wondering about an addition to allow a prefix to be set that will rename all tiddlers with “prefix/something” to $:/plugins/PublisherName/PluginName/something. But perhaps this only useful to me.

A future iteration or feature;

  • Of great potential value would be an easy way to select any plugin, throw it into a draft mode, add changes and regenerate for new versions. Eg with Gatha Plugin - customised or additional boilerplate tiddlers.
    • This could be done to update Gatha for personal use
    • I would be helpful Gatha the draft plugins also permitted a plugin filename to be set to be used to overwrite the previous version on disk, rather than the one including the version.

More
Elsewhere you are involved in new plugin types, I have lost the link to this. I wanted to suggest whist “media” suites your proposed plugin types, I want to draw your attention to the idea of “data” plugins as well. For example as generated from XLS or CSV in the JSON mangler. For example test data, or glossaries, geological epochs etc…

  • This raises the possibility of a simplified user interface to allow data plugins “accrual process” without need to have all the settings of Gatha.
  • For example; Import a data plugin containing fruits (as sub tiddlers or data tiddler(s)), add/edit fruits and increment version, regenerate the data plugin (optional re-import) to basically transform new and edited shadows tiddler back into the plugin.
    • In this way one can import data, use and update and regenerate, thus the data plugin will accrue additional data over time.
  • Both with regular and data tiddlers it would be nice if a tiddlywiki, given a wiki name and its location/address, if these were included in the plugin tiddler. This would allow the author to know which wiki it was authored in and represents the “source of truth”. I have this in my own JSON packages but think it would help authors manage the plugins they are responsible for. In my case I could have hundreds one day.

Thanks again.

1 Like

Given you have here a plugin generator, I would like to suggest it is a great place to introduce some de facto standards (that comply with the De Jure standards of course).

These include;

  • Media plugins
  • Data Plugins
  • Version increments
  • Demo / Code links
  • Library it resides in

Without going into too much detail it could include some ideas I have developed such as;

  • Payload tiddlers - this refers to tiddlers a plugin may be used to create for example a plugin to make buttons, the payload would be the buttons that were made (would work nicely with my aforementioned ‘plugins “accrual process”’)

Finally, once well developed I would hope this solution may be added to the core plugins to empower more to make use of the plugin mechanism.

1 Like

Hi @TW_Tones,
many thanks for your valuable idea and comments! For sure I saved your comments in my Todolist of project to look at them later and see how I can I benefit from them and improve Gatha!

In the original post I have given links I past them here: [2] Gatha (Zoroaster) - Wikipedia. Also see original post here [1]. Proof of Concept: Gatha a Plugin Maker and Content Manager - Plugins - Talk TW (tiddlywiki.org)

It is an old Persian word refers to a section, part, originally Avestan hymns. I used it here to mean a collection of tiddlers for a special purpose like a course note, …

They are used for plugin tiddler and you edit them through a form! So not good to have two boxes at the same time! but one can directly create the fields

This is up to author! You can have a very long tiddler

It is highly recommended! Relink is an essential tools in all my works!

Yes, I tried to keep the UI simple, but these tools can be added

This is in my todolist! @telmiger suggested to be able to edit and hack or customize plugins! I will add this features into next releases!

Absolutely!

I think Gatha brings the knowledge of making plugins to the access of non-technical people! I think data/content

plugins shall be easy enough to be built by any ordinary user!
So, Gatha is the step toward this objective!

Gatha is very simple, but can be simpler :wink:

Tinka has this feature! I think it is not hard to do that! I prefer to let me assign the version manually!

1 Like