Has anyone previously made a process to compare two tiddlers, with different titles or one being a shadow and the other an edited shadow tiddler including, comparing all or most field values?
The DiffTextWidget seems to have sufficient functionality to do this
You may want to compare all fields except modified and possibly created, creator and modifier
Ideally one could do this with a filter and detect those that are effectively identical so one of the two can be deleted.
Perhaps a preview field differences would be helpful
Even more interesting if one of the tiddlers was within a JSON tiddler (non-plugin)
I have also noted that the input process allows examination of differences as well as for fields. Although in both cases they do so graphically. I am keen instead to check all fields and text for differences (excluding created and modified) as these are almost inevitably, ideally with a count, any changes above 0 would mean they are not identical.
This all reminded me of an opportunity to make better use of the preview tools. I have built some interesting tools I will share soon.
Including making use of other previews I created as well.
When investigating the difference tool I learned we use this library $:/core/modules/utils/diff-match-patch/diff_match_patch.js a public library with API · google/diff-match-patch Wiki · GitHub I suspect there are more functions we could provide access to with a little javascript.
This includes generating patch content and more.
See the DiffTextWidget and the note that Within it, the variable diff-count is available.
The key feature may be given two tiddlers is there 0 or more differences in any field including text but except a list of fields eg; title, created and modified fields
I have already started by writing a difference checker between two different tiddler names, by simply comparing each field in both tiddlers with exceptions.
Your documentation will help me apply this to shadow/tiddler pairs.
Later I would like to apply it to tiddlers inside a JSON (not just a plugin), more than one JSON format.
@wjamoe very comprehensive. I will keep this reference for when I need it. However what I am looking for is a simple test of each field (except nominated fields) with a change to use programmatically rather than visually.