Skip to main content

Module merge

Module merge 

Source
Expand description

Merging duplicate items, as Eagle’s duplicate panel does: one item of each group is kept and takes the name, link, note, folders, tags and rating chosen for the group; the others go to the Trash. Nothing is deleted, and the kept item is saved like any other edit, so an open undo transaction can put everything back.

Structs§

Choices
What a group’s items offer, for the merge review: each distinct non-empty name, link and note in the group’s order, every folder and tag, a note joining all notes when there are several, and the highest rating.
Merge
One group’s merge: the item kept, the items trashed, and the values the kept item ends up with.
MergeReport
What Library::merge_duplicates did.

Functions§

best_first
Orders similar pictures best first, as Eagle picks the copy to keep: the most pixels, then for the same format the bigger file, else the better format (PNG, BMP, JPG, JPEG, WebP, AVIF, JXL, HEIC, HEIF, JFIF). The sort is stable, so ties keep their order.