2016-05-16 Renaming Photos

I’m trying to get rid of iPhoto and Photos and wanted to have a little Perl script that would go through the image files in a folder and rename them using the creation date and the nearest city.

Sadly, I ran it on a directory full of pictures and it only found the necessary EXIF data in three files. Now I’m sad.

Here’s the Perl script, if you’re interested, on GitHub.

on GitHub

It uses `Image::ExifTool` to get at the meta data and it uses `Geo::Coder::OSM` to determine the nearest city based on GPS meta data. This means that your photos must be taken using a camera that embeds GPS coordinates in the file.

Use `--verbose` to get an explanation if nothing happens.

​#Perl ​#Pictures

Comments

(Please contact me if you want to remove your comment.)

I’m waiting for the day when I will read your blog post named “Importing your data from Google+” or something along the lines. 😄

– AlexDaniel 2016-05-16 17:21 UTC

---

Daaaaaaamn! 😄

Actually, I try to copy longer stuff I write to the blog, just so that it’ll survive Google+’s sun-setting. Gah.

– Alex Schroeder 2016-05-16 19:15 UTC

---

I like http://geotag.sourceforge.net/ to add missing locations to pictures.

http://geotag.sourceforge.net/

– Sam 2016-05-17 12:27 UTC

---

To be honest, most of my nice pictures are made using a camera without GPS and I’m usually way too lazy to keep the companion app running on my phone when I’m on a hike.

And back when I had a camera with a built in GPS, it turned out that the GPS took waaaaay too long to start up, and I ended up no liking the colors the camera produced.

So, I guess this project was more of a time waster, flexing my programming muscles while waiting for Claudia...

– Alex Schroeder 2016-05-17 15:24 UTC