Hacker News new | ask | show | jobs
by twohearted 3833 days ago
This is very close to what I'd consider the ideal photo organizer. However there's a feature I'd like to see that I'm not sure is possible without a database. Tell me what you think.

How does this handle dupes and near-dupes? People have photos scattered all over. Can I throw a random old folder of photos at this and trust that it won't overwrite an otherwise identical jpg with a bit-rot corrupt one for example?

You mention idempotence in your blog post, if I run this twice using the same 'unorganized' source folder, will it copy all the files again the second time?

1 comments

Duplicates are handled in two ways.

If the same photo (based on a sha256 hash) is imported twice it will ignore it and return the location where that photo exists. This information is kept in a ~/.elodie/hash.json file but is only for efficiency. Read on...

The second way it's handled is that the rules engine will deterministically map a photo to a file path. This means two photos named IMG_0001.JPG with the same EXIF will be stored at the same location. If the sha256 hash is not found it will simply overwrite that file with itself. The likelihood of an accidental collision is extremely low but not zero.

That leads me to answer your last question. One of the goals was that you can run a corpus of photos that was already organized through the software and get the exact same output. If you specify a different output folder it should be identical to what was already organized.

Hope that helps :)