about summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorArun Isaac2025-09-29 13:55:46 +0100
committerArun Isaac2025-09-29 14:01:51 +0100
commit9766e70f7fea16642fbf53272d7775bedd846a48 (patch)
tree5cc66866c01ef94819ef7c3773a3d0ebecc660d2 /README.md
downloadphoto-utils-main.tar.gz
photo-utils-main.tar.lz
photo-utils-main.zip
Initial commit HEAD main
Diffstat (limited to 'README.md')
-rw-r--r--README.md32
1 files changed, 32 insertions, 0 deletions
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)
+```