From 9766e70f7fea16642fbf53272d7775bedd846a48 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 29 Sep 2025 13:55:46 +0100 Subject: Initial commit --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..e49fe07 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +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](https://www.phash.org/). 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](https://nsxiv.codeberg.page/). 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) +``` -- cgit 1.4.1