about summary refs log tree commit diff

This repository contains a collection of scripts I use for managing my photo collection.

Install dependencies

Drop into a shell with the necessary dependencies.

guix shell -m manifest.scm

Find and delete very similar images

Group images

Group similar images. Each line of the output contains one group—a space-separated list of images.

./find-duplicates IMAGES-DIRECTORY > dups

We group by comparing images using their perceptual hashes. For performance reasons, we only compare images within a specified time window. We obtain the creation date/time of the image from its EXIF metadata. Images without an EXIF date/time are ignored. The date/time and the perceptual hash are cached on disk.

Screen images for deletion

Go through the groups one by one and mark images for deletion. Images are not actually deleted. The marked images are merely output. It is up to you to delete them yourself.

./filter-duplicates < dups > deletes

Images are shown using nsxiv. All nsxiv keybindings work. The important ones are: - m to mark for deletion - q to go to the next group - ENTER to show group in thumbnail mode

Delete images

Actually delete the short-listed images.

rm $(cat deletes)