The pictures hell

I don’t know about you, but I for sure take a lot of pictures. I got my first digital camera as a teenager. Then came smartphones and later action cameras.

I try to stay organized, but I must admit I was not syncing all my pictures as often as I should have and things sometimes got ugly.

So, in early December 2014, I decided I needed to write some tool to help me sort things out. A couple of hours of hacking and I had something that worked for my usecase (Scary Bash code here).

More than 5 years later, I realized I was not so confident running this code anymore. Not using it often enough probably eroded my confidence (I was not exactly sure how it was sorting my pictures anymore) and the lack of tests made that confidence check long and painful.

In April 2020, I was locked down like most people on the planet, and I wanted to have a look at some of my pictures. It was a nightmare: I had to do something! Diving into a nice side project to forget the craziness of the world for a bit sounded like a great idea, and zoy was born.

To avoid running into the same issue again, I decided to write the new project in Clojure, architecture it well and write lots of tests. Starting again from a blank page was great because I could redefine my need, list a few usecases and iterate on what worked and what didn’t with my 2014 tool.

I ended up with 2 features I really wanted:

  • like the 2014 version, I wanted my program to take a dump of pictures from A, rename the files using EXIF data (camera name and date essentially) and then move it to B in the right directory. In 2014, my tool created a folder for each day. With zoy, I considered one per month was more than enough!
  • to ensure I was not sorting the same pictures over and over again (several copies of the same pictures), I wanted deduplicating capabilities.

Chatting with my partner, I decided to add another option: rename only. That’s useful for pictures that are already organized in another way (“My 24th birthday” or “2017 week-long hiking trip” kind of thing). You don’t want to mess that up, just rename the pictures.

Anyway, that was a little bit of the backstory behind zoy. I was really happy to write Clojure again for more than a few hours, and if you’re interested, the README should help you get started.