[TW5] Json Mangler Plugin v2.0.8 - The Over 9000 Csv Update!

84 views
Skip to first unread message

Joshua Fontany

unread,
Feb 4, 2020, 11:08:05 PM2/4/20
to TiddlyWikiDev
Hi Everybody,

I'm very excited about the new release of Json Mangler. I'm calling this the Over 9000 Csv Update!

(I hope enough of the audience gets that...)

This update turns Json Mangler into a swiss-army-knife-data-conversion tool. Nearly all databases can export to csv tables, and now all your base are belong to tiddlywiki.

;D
  • New $csv widget parses and renders any tiddler with type = 'application/csv'!
  • Simply drag/drop your *.csv text-file, complete the import, (type is auto-set to 'application/csv')!!
  • OR use a 'tiddlywiki.files' file to import whole folders of Csv data at once!!!
  • CSV does not mean COMMA seperated values, it means CHARACTER separated values (set your own - no UI on first release)!!!!
  • Fully configurable access to the included PapaParse library via a "state" tiddler for each $csv widget onscreen!!!!!
  • Peek/preview to limit the rows loaded, skip-to-page to jump around LARGE datasets, a whole bunch of cool options!!!!!!
  • Sophisticated CSV Import - like, whoa!!!!!!!
  • Import the whole thing as one JSON Array tiddler, or import each row of the Csv as a Json or regular Tiddler!!!!!!!!
  • Dynamic creation of "simplified" field-names when importing individual tiddlers based on column index# or a "slugged" version of the original column name!!!!!!!!
I have included a test Csv in the new example wiki (below), which is a database of video game sale from a few years ago. It has 16,600 rows (including an empty row, and a headers row), so you can play around with all of the peek, display, and import options.

Thanks very much for any feedback!

Github repo: https://github.com/joshuafontany/TW5-JsonMangler


This plugin is a work in progress; any suggestions or bug reports are very welcome.

If you find this useful and would care to donate, please use my PayPal: https://paypal.me/JoshuaFontany

Best,
Joshua Fontany

Jimmy Liew

unread,
Feb 5, 2020, 8:38:40 PM2/5/20
to TiddlyWikiDev
Hi Joshua,

How to import a CSV file?
I attempt to drag and drop to the TW5, and it creates a new tildder instead.

Joshua Fontany

unread,
Feb 5, 2020, 8:56:40 PM2/5/20
to tiddly...@googlegroups.com
Hi Jimmy,

Once you have your data in the wiki as a csv tiddler, open the csv options slider (csv file button in the header), then open the $:/Import options (last one, paperclip slider button). Choose an import type & click the "$:/Import ThisTiddler" button once all import settings are confirmed.

The widget in the UI will the automatically save the data as one or more (one per row) new tiddlers in a new $:/Import tiddler in the Story. Confirm from there.

Best,
Joshua Fontany 

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/wwMaABzyabE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/2d44ba3a-fec8-4b98-a685-592c35020111%40googlegroups.com.

Joshua Fontany

unread,
Feb 10, 2020, 10:10:45 PM2/10/20
to TiddlyWikiDev
Hi Everybody,

There have been a couple of bugs found, and are working on getting fixed.

  • Unchecking "Peek" does not actually allow importing of all rows (FIXED)
  • The browser locks up upon importing large csv(s) (15,000+ rows) as individual tiddlers.
  • Peek/Preview max row number count can be thrown off by new-lines in the data.
    (Looks like we need to actually papa-parse the full file to get that count. Can we do that on import and cache it?)

I think it is worth examining how I am importing the individual rows. It almost doesn't make sense to use the "usual" $:/Import process, especially for large-numbers-of-individual-tiddlers-at-once. One possibility I thought of was bundling them all as a plugin, thus making each row a Shadow Tiddler that could be overwritten/replaced, etc. Open to suggestions.

Best,
Joshua Fontany

A Gloom

unread,
Feb 12, 2020, 11:21:33 PM2/12/20
to tiddly...@googlegroups.com
Joshua,

nice! I shall have to test with Google Sheets .csv's
> --
> You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/b9727b1f-8fb6-45aa-9d2b-6719f5dd7be9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages