[TW-5 Plugin} New Plugin - TW5-JsonManglerPlugin!

143 views
Skip to first unread message

Joshua Fontany

unread,
Dec 3, 2018, 9:46:28 PM12/3/18
to TiddlyWiki

HelloThere!!!

I'm so excited to share this new plugin with the community.!


TW5-JsonManglerPlugin by Joshua Fontany, v 2.0.0


This plugin changes the methods tiddlywiki uses to retrieve and set values in json data tiddlers.

It does this in a way that aims for backwards compatibility.

It also introduces new features, widgets, and filter operators:

  • Allows TextReferences to target nested values ("complex json").
  • New buttons in the edit-template for json data tiddlers.
  • An automatic alert/error notification when calling message actions on an invalid json data tiddler.
  • $jsonmangler, a widget that catches messages to edit json data tiddlers.
  • An updated ''indexes[] operator'' that can show all index paths. If given the argument verbose, it will list all paths, including the root path to nested objects and arrays.
  • A new ''hasindex[] operator'' that returns only those input tiddlers that have a value the index path argument.
  • A new ''tsort[] operator'' that uses a //tokenized sorting method// to resolve pesky sorting problems.

Further documentation is available in the example wiki: https://joshuafontany.github.io/TW5-JsonManglerPlugin/

This plugin is a work in progress; please report any issues on GitHub: https://github.com/joshuafontany/TW5-JsonMangerPlugin/issues

Repository Link: https://github.com/joshuafontany/TW5-JsonMangerPlugin

TonyM

unread,
Dec 3, 2018, 10:53:12 PM12/3/18
to TiddlyWiki
Joshua

This looks very promising and a great extension to tiddlywiki. If however I may ask could you include a multidepth json read, list and write examples for those of us who are yet to learn the details of json file standards. I am just looking a kick start in tiddlywiki.

Thanks
Tony

TonyM

unread,
Dec 3, 2018, 10:53:16 PM12/3/18
to TiddlyWiki

Joshua Fontany

unread,
Dec 3, 2018, 11:15:29 PM12/3/18
to tiddl...@googlegroups.com
There are prewritten test tiddlers for everything I touched or added  in the Example Wiki (below the HelloThere tiddler). Most have a codeblock that shows the code and then renders the test. I also documented the new widget and messengers in the tiddlywiki.com style.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/mCudZtzoXU4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c1a18753-4753-4b83-a53b-cd23c716f8a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohammad

unread,
Dec 4, 2018, 1:34:14 AM12/4/18
to TiddlyWiki
Great Job Joshua!

 I will test and give my feedback.

Best
-Mohammad

David Gifford

unread,
Dec 4, 2018, 6:19:34 AM12/4/18
to TiddlyWiki
Added to the TiddlyWiki toolmap!

Diego Mesa

unread,
Dec 4, 2018, 7:49:54 PM12/4/18
to TiddlyWiki
Hey Joshua,

Thanks for this - if Im understanding it correctly it could be very powerful, and very useful. Could you include a simple, intermerdiate and advanced use case/example in the documentation? I want to make sure Im correctly understanding it!

Thanks!!!!

Joshua Fontany

unread,
Dec 4, 2018, 9:12:05 PM12/4/18
to tiddl...@googlegroups.com
Thank you Diego,

I am working on brainstorming up some more complex examples.

The neat things that I have in mind include:

* allowing a tiddler in View mode to host text-boxes and other editing widgets by pointing them to a "backing data tiddler", which you could then transfer those values (or only the specific ones you want) to the host tiddler with a button press.

* Interesting uses of the .pop(), .push(), .shift(), .unshift, and .splice() (insert) javascript methods that I have exposed to wikiscript in the form of the action-messages and the mangler widget.

* Integration with TiddlyMap.

* Expanding groups/bags of tiddlers from a hosting data-tiddler.

* Packing a plugin tiddler using tiddlywiki widgets from the browser (instead of from the console).

* Tighter integration with programs outside the node.js tiddlywiki instance (automation based on IF specific tiddlers exist, and reading data from them as JS Objects/Arrays).

These are of course longer term goals. First I'm going to refactor my Table-Renderer widget to use these new features, .push()ing a row of data to extend a table, inserting a table in another table, etc.

I'm open to more simple ideas too....

Thanks for trying the plugin!
Joshua F

Mohammad

unread,
Dec 5, 2018, 12:21:46 AM12/5/18
to TiddlyWiki
Joshua,
 I appreciate if you could add some examples in your demo page.


-- Mohammad
Reply all
Reply to author
Forward
0 new messages