Expand description
Finding duplicate items: exact copies by content hash, and near copies by a perceptual hash of their thumbnails. See the Import chapter of the docs; Eagle stores no hash in item JSON, so nothing here writes to items.
Structs§
- Cache
Entry - Cached hashes of one item’s original, valid while its size and mtime stay the same.
- Hash
Cache - Hashes keyed by item id, which the caller can keep between runs (it is plain JSON; falcon doesn’t store it in the library).
Functions§
- content_
hash - BLAKE3 hash of a file’s bytes, as 64 lowercase hex digits.
- find_
exact_ duplicates - Groups of items (not in the trash) whose originals are byte-identical.
- find_
exact_ duplicates_ cached find_exact_duplicateswith a cache. Only files that share their size with another file are hashed.- find_
exact_ duplicates_ in find_exact_duplicates_cachedamong the items inonly(all live items whenNone), as Eagle scans the selection or the current list.- find_
near_ duplicates - Groups of items whose pictures’ perceptual hashes are at most
thresholdbits apart (about 10 suits resized or recompressed copies). Groups are linked transitively. - find_
near_ duplicates_ cached find_near_duplicateswith a cache. Entries are keyed on the original’s size and mtime, like the content hash, since a thumbnail only changes with its original.- find_
near_ duplicates_ in find_near_duplicates_cachedamong the items inonly; items outside it never link two groups together.- group_
close - Links every pair within
thresholdand returns the connected groups. - hamming
- Number of differing bits.
- perceptual_
hash - A 64-bit perceptual hash (pHash): the image is reduced to 32×32 grey, transformed with a 2-D DCT, and each of the 8×8 lowest frequencies becomes a bit, set when it is above their median (the DC term excluded from the median).