Here is another version for you incorporating a number of the changes and additions mentioned above. Add the duplicate exemption support raised the complexity several times but I "think" it is getting there.
If you have downloaded a previous version, please delete the "Find Duplicates.json" config file from your plugins folder. I couldn't be bothered with backwards compatibility for a beta.
Stuff I know differs in this release:
- Fixed various bugs to do with navigating and initial group selection
- Fix the "3 in a group" bug that Tom found.
- Rename the algorithms as per Charles suggestion.
- Implement the "Mark group as exempt", "Mark all groups as exempt", "Show all duplicate exemptions" and "Remove selected duplicate exemptions" features
- Added a "Show all duplicates" menu item. Note this does not as yet attempt to do any of the restriction/highlighting stuff above, will wait for Charles to add stuff to Calibre
- Significantly changed the way books are marked.
The marking dictionary stuff is quite different to my first version. What I do now is store a whole bunch of markings at the same time, and recalculate them all every time you do an action. So for instance you could at any point do "marked:duplicates" to see all the books reported as duplicates. In fact Charles you can do this as a saved search, manually turn on highlighting and then use the next/previous group to do exactly as we discussed above a little more "manually".
At the same time it is also possible to view individual groups using "marked:duplicate_group_000x". Choosing next/previous result will recalculate the marked books, but if you felt so inclined you could just overtype the number and hit Go to see a specific group etc.
The third simultaneous marking is "marked:not_duplicate". This is applied to all books that are part of a duplicate exemption.
In theory we could use the above for sorting when showing all duplicate books, as I store composite values with "duplicate_group_000x" always at the beginning of the "marked" field value. I haven't bothered to apply any sorting at this point but the ability is there.
Removing duplicate exemptions is as I described in posts above - for each book you have seleted, it removes all associated exemption pairings. So if you initially mark a group that has (1,2,3) that will create exemptions of (1,2),(1,3),(2,3). If you were to right click on book 3 and choose remove exemption, then refresh your search it will just keep (1,2).
Clearly I haven't thrashed it and could well have broken new stuff so as always feedback appreciated. If you don't like the menus, names, ordering, want more/less confirmations or whatever please offer suggestions along with anything else that comes to mind. I suspect we are closer to a 1.0 release than 0 which the number indicates but it may just be wishful thinking.