I like to make use of packages of tiddler that I export in JSON files, I also sometimes pack this into a bookmarklet to install with a single click.
For some of my larger packages I occasionally release a new version with updated tiddlers. I simply reimport the package and all tiddlers are replaced with updated ones, new tiddlers are added.
There is however no mechanism to include in such packages a way to indicate an existing package tiddler is to be deleted.
- As a result I need to delete all the tiddlers before reimporting the package again, just in case.
Has anyone tried to address this already?
Perhaps we could define a mechanism to indicate a tiddler in the import is instead to be deleted if it already exists?
- This may be as simple as a “de facto” standard fieldname eg delete-tiddler-on-import=“reason the package wants to do it” in the tiddler to be imported.
- Perhaps later make this a “de jure” standard.
We could update the Import mechanism to list these and give the user the option to review and select the tiddlers to be deleted so there are no silent deletes?
- This is even more important when we have previously overridden a system tiddler and not longer need to.
If we are updating the Import mechanism we could also differently highlight imports that override system tiddlers, and especially system tiddlers that have already being overridden.
- Which is what occurs when there are clashing changes.
The idea is to detect this and leave it to the user to resolve, whilst providing some helpful tools.