[TW5-JsonManglerPlugin] v2.0.3 Update!

97 views
Skip to first unread message

Joshua Fontany

unread,
Mar 1, 2019, 12:16:44 AM3/1/19
to TiddlyWiki
I was able to resolve the major bug reported by mauloop. Turns out a library had added a custom sort property to the Array object prototype. This custom function was then iterated anytime an array was used in a for (var x in keys) loop. Which broke a lot of stuff. A lot.

All patched, and I restructured my repository a bit. Now you can install the single-tid version from the example wiki, or install a node folder-style setup with all dependencies by downloading the Release *.zip file.

https://github.com/joshuafontany/TW5-JsonManglerPlugin/

Best,

Joshua Fontany

mauloop

unread,
Mar 1, 2019, 4:34:31 PM3/1/19
to TiddlyWiki
Hi, Joshua.

Just tested. Good work. It looks like if quite all of the strange behaviours a noticed with 2.0.2 + Tiddlymap has been solved. It still pretends to initialize Tiddlymap environment every time I reload the wiki. This happens with my test enviroment (the same I used for my test with 2.0.2), but it does not with my real "production" wiki. 

This should be investigated further, but by now it is not blocking for me. Thank you very much for your help.

)+(

P.S.: I have one more question (or maybe a suggestion). I use to load plugins via tiddlywiki.info. In my tiddlywiki\plugins\plugin_name folders I just put a single plugin.info file. The plugin.info I use is derived from the plugin tiddler reworked in a way that turns the fields in the .tid header into json keys. I attach the plugin.info file I use for JsonMangler as an example. I found that this format makes it easier to distribute plugins than the github tree as in your JM_v2.0.3.zip. Is there anything wrong in my approach?
plugin.info

Joshua Fontany

unread,
Mar 3, 2019, 4:15:08 AM3/3/19
to TiddlyWiki
That is really neat, I had no idea you could do that.

Will the server pick up any correctly formatted raw Json object w/ !!title, etc?
Or only those in the plugin folder with *.info extentions?

That deserves some testing and reading the source.

Best,
Joshua Fontany

TonyM

unread,
Mar 3, 2019, 8:01:00 AM3/3/19
to TiddlyWiki
Joshua,

With you json skills, could you consider mus suggestions in this thread please

https://groups.google.com/forum/m/?hl=en#!topic/tiddlywiki/ThFUZWIy11A

Tiddler to json tiddler and return tools.

Thanks
Tony

TonyM

unread,
Mar 3, 2019, 8:35:24 AM3/3/19
to TiddlyWiki
My actual post, for your convenience.

Another idea would be to develop a method to move tiddlers into a json tiddler one of these would be on delete to $:/trash this mechanism would allow trash to be saved out and deleted or imported bach in.

A related mechanism would be to select one or more tiddlers inside a json and restore it perhaps even using a revised import mechanism.

A single tiddler to bundle multiple tiddlers would be good for trash handing, intentional bundling, import and export, multiple tiddler clipboards, macro, plugin and template stores and more. Thus to solve one problem we facilitate a lot more opportunities.

Regards
Tony

mauloop

unread,
Mar 3, 2019, 4:53:15 PM3/3/19
to TiddlyWiki
I can't answer. I learned this trick observing other plugin.info files.

I was searching for a way to install plugins just once and serve all of my wikis. Unfortunately not all the plugins provide a node.js version as yours or if they do this is often not clearly documented or ready to use.

I set up my working environment creating plugin.info files for all of the plugins I mostly use. All I need is to export the plugin tiddler in a tid file and a shell with vi or sed or awk. I have no such Javascript experience to do it directly within Tiddlywiki, but I think it should not be too hard.

I did not investigate the opportunity to load other kind of json nor have the knowledge to explain the way it works.

IMO this is one of the parts in Tiddlywiki documentation that should be improved. Maybe I could better open a dedicated thread. Sorry. It was me the first talking about plugin format in the space you opened to announce the wonderful JsonMangler.

Thanks for your attention.

)+(

Reply all
Reply to author
Forward
0 new messages