Importing a large json file containing hundreds of new tiddlers

I knew there was a simple way

As soon as you told me

  • This became obvious.

I have not tested this but you may want to try this;

  • Download a copy of tiddlywikis empty.html
  • Drop your Import JSON on this new wiki ''Don’t Import"
  • Edit the Import tiddler $:/Import and
    • give it a new title eg “Import Plugin Feb 2023”
    • Edit the field plugin-type and change it to plugin
    • Save the tiddler

You now have a plugin containing your import tiddlers, as shadow tiddlers. Make sure your main wiki has a backup, then.

  • Drop your “Import Plugin Feb 2023” tiddler on your main wiki

All done

  • The new tiddlers are now available as shadow tiddlers
    • but any existing ones will show as overridden shadows, or tiddlers ie they remain the current version.
    • You may need to change any lists or filters to use [all[shadows+tiddlers].. to include the shadow ones.
    • You can edit a tiddler and use the preview to see “difference from shadows” at least for the text field.
  • Next time follow the same process to update all the shadows but not the “edited” tiddlers.

This is a little messy because you may already have many existing tiddlers you have not edited, but are already tiddlers (as opposed to shadow tiddlers). Had you followed the above approach from the beginning you would not have these.

  • We could possibly come up with a batch process to clean up your current wiki. ie delete all tiddlers for whom you have an “identical” shadow tiddler, ie no differences. Possibly ignoring the created and modified date in this comparison.
1 Like