Vibe Coding a Flickr Export Tool with Google Gemini

Reading Time: 3 minutes
Recently I decided that I would backup my Flickr library locally despite having over a year left on my pro account. In so doing, when the decision comes whether to dump, or keep using flickr, I will know that my data is safely backed up locally. Of course I decided to play with the archive but came upon a snag.

E6 Microdegrees

That snag is that Flickr uses the E6 Format, also known as Microdegrees. With Google Takeout, when I exported photoss I used the exiftool to add metadata to photos and it worked fine. Because it worked fine I then moved photos to Photoprism and Immich without issues. With Flickr photos using the E6 Microdegrees format photos displayed as being taken in the middle of the Atlantic near the coast of Africa rather than the canton de Vaud.

With a few iterations Gemini finally figured out the issue and divided exif data by a million. To correct this error Gemini and I exported the proper geodata to a CSV file, before then adding it to the exifdata of photographs.

Re-Use Flickr Metadata Added Over the Years

This morning I decided that I wanted to add the tags, titles, and other metadata back into the exif data so we created a new iteration of the CSV file.

Re-naming files With Their Creation Date

After several iterations I decided to rename files using their title when they had a human readable title, rather than the number given by Flickr's tools. I then decided that since we're renaming the files anyway we might as well add original creation date of the files to the filename. They now use the yyyy-mm-dd-filename.jpg convention.

A Folder Hierarchy

Since we've added the metadata to the photos, and renamed the files to display their creation date without opening individual files it made sense to go an extra step by creating a folder architecture by year/month/day. In so doing it becomes easy for an individual to look for, and find photos, without the use of a CMS.

TLDR of Steps According to Gemini

Pair Flickr JSON metadata with original images.

Extract and convert GPS from E6 to decimal.

Sanitize titles into safe slugs using the re module.

Build a hierarchical Year/Month/Day folder structure.

Implement a 'Smart Migration' script with space checks and progress bars.

Execute a bulk copy to rename and organize 78,000+ files.

Verify integrity by matching file counts.

The Rational Behind Backing Up

Flickr is a great community for photographers to share beautiful photos but its free tier has shifted. It went from 200 public photos, up to 1TB, and then back down to 1000 photos max. the price per year went up so it became more interesting to pay for two years, rather than one at a time.

For a while I downgraded to the free tier, expecting that my photos would be deleted from flickr. They weren't. I stopped paying because I expected Flickr to be mothballed and eventually vanish. It currently looks alive and well. I believe that's why I decided to pay for another two years at the time.

An Export Worlflow and a Reason to Stick With Flickr

My experiment, over the last two days has strengthened the use case for Flickr Pro as a cloud backup solution. If like me, you have a work flow in place to download and process Flickr Export zip files, then within a day or two you can re-create your library locally.

A simple "for each loop" can download your zips in the background once the backup is ready.

And Finally

Years ago I exported photos from Google Photos via Takeout and from Flickr via Flickr Export but I didn't know how to re-combine the data from the json files into photo exif data. Over the last week, through experimentation. I have been able to export photos from Google Photos and Flickr, and recover them, for ingesting into Photoprism and Immich.

Without Gemini I would need to spend hours reading the documents and through trial, and error get it to do what I want. With Google Gemini it does the RTFM part (read the fabulous manual), and I ask it for help.

Now I'm on the cheapest iCloud tier, I can downgrade to a cheaper Google One tier, I can dump Swisscom MyCloud and I can re-think how I use Flickr.

I have been using Gemini as a tutor.