Folks,
I just revisited this thread with a clear mind,
This is a technical musing which may provide some interesting options.
I realised there are two kinds of manipulations we need to do on incoming
tiddlers. One is pre-import, acting on them before import, or at least
before unpacking the import JSON and those post import.
- The first pre-import needs interrogation of the JSON file created with
the import process;
- The Second post import needs to act on the tiddlers imported.
So we need json handling, eg Joshua's tools for the first, and with the
second we can use any tool for post import processing as long as we have
access to the list of imported tiddlers.
It seems to me if we can enhance the import process to generate a list of
imported tiddlers, that can be used programaticaly, and use this list for
any post processing that will be handled.
In the pre-processing step it seems we need to be able apply these minimum
functions
1. Import all tiddlers with a prefix or suffix added, so they do not
overwrite and existing tiddlers, or can be bundled for later processing.
2. Be able to apply a filter to the incoming tiddlers and chose which in
the import list is to really be imported, perhaps even by comparison to
existing tiddlers.
- However if the 1st step is available we can do the 2nd in a post
processing with a prefix awareness.
In fact one way of doing the equivalent to item 1 above is to turn the
import tiddlers into a plugin (rename plugin-type to plugin) , then the
imported tiddlers become shadow tiddlers. But shadow tiddlers are never the
less tiddlers and may override and existing tiddler when accessing the
imported tiddler name.
Another way is to save the import to ar JSON tiddler (Which it is) and
process that later.
Regards
Tony
On Saturday, June 13, 2020 at 4:07:27 PM UTC+10, TW Tones wrote:
>
> Joshua
>
> Lovely work like usual. I knew the json mangler plugin would start to pay
> off with particular applications like this.
>
> I would be keen to apply filters and actions to the json tiddlers during
> import to add or remove title prefix/suffix or field value pairs.
>
> This would allow importing tiddlers that would overwrite existing ones
> under a different namespace and keeping them there or allowing a difference
> check and commit process. This could help with multiple contributors
> submissions such as via the comments plugin.
>
> I expect even just a subset of json mangler features to handle import and
> json files would go a long way.
>
> Thanks
> Tony
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ed55e75c-424b-400b-ab9b-6c6e9631e0beo%40googlegroups.com.