How To Correctly Export And Migrate Away From Google Photos

This article unfortunately doesn’t have all the details.

for f in */*.PNG ; do
  if [[ $(file -b --mime-type "$f") = image/jpeg ]] ; then
    mv "${f}" "${f/%.PNG/.JPG}"
    mv "${f}.json" "${f/%.PNG/.JPG}".json
  fi
done

for f in */*.HEIC ; do
  if [[ $(file -b --mime-type "$f") = image/jpeg ]] ; then
    mv "${f}" "${f/%.HEIC/.JPG}"
    mv "${f}.json" "${f/%.HEIC/.JPG}".json
  fi
done

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json .

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *