This repository contains scripts for making your everyday life easier - especially if you're up to some tedious manual work.
No breakthroughs here - anyone writing code for living can write these in 10 minutes. The goal here is to perhaps inspire those who don't even know the manual work can be avoided.
- Suppose you have two versions of photos - high quality and low quality, each in its folder, and the filenames are the same in both.
- Suppose you created a subset of the high quality photos in a third folder, e.g. for an album.
- You found out the album would be too large.
- Now want to create the same subset of the low quality photos.
The script selects files from a folder (source) that have the same names as files in another folder (subset definition), and stores them in a third folder (output).
- In the script, specify the directory storing all photos as
source
and the directory containing the selection assubset_def
- Run the script
- The files selected from
source
will appear inoutput
directory
- You have nicely sorted photos on your disk
- You upload them to a Google Photos album
- The order of the photos is screwed up.
Now, there might be a lot of reasons for that, but it's quite likely that the timezones aren't set for some of the photos, or are set differently, e.g. if taken by a different camera.
- You can only sort by date, not by name.
- If the timezone for a photo isn't present in the metadata, it's set by Photos on upload based on your browser (I guess) - for me it was GMT+02:00.
- However, if some of the photos contain a timezone, it's left as it is. For me, this was GMT+00:00 for some of the photos.
The script changes the timezone of photos that have the attribute in metadata to the timezone of your choice. This should be the timezone Google Photos sets for the photos with no timezone. It's not possible to add the attribute if it doesn't exist in the metadata - but Google Photos will take care of that.
- Create a folder containing all photos you want in the album
- Specify that folder as
in_directory
in the script and run - Upload the photos from
out_directory
to Google Photos and see if the order is right
Stack Overflow & friends isn't of much help here - at least not when I encountered the problem. There is this github issue, and this exiftool thread pratically saying what the GitHub issue suggests won't work - but as of October 2021, what this script does seem to work.
This repository contains scripts for making your everyday life easier - especially if you're up to some tedious manual work.