zaczero / google-photos-takeout.sh Goto Github PK
View Code? Open in Web Editor NEW🔧 Fixes Google Photos Takeout metadata
License: GNU Affero General Public License v3.0
🔧 Fixes Google Photos Takeout metadata
License: GNU Affero General Public License v3.0
It appears that there are two lines that break on POSIX systems, such as macOS.
Hi
thanks for providing the script!
i try to run it via git bash on windows and i am facing this issue:
"$ sh google-photos-takeout.sh
[1/2] ./Google Fotos/Photos from 2021/IMG_2662.JPG.json : ./Google Fotos/Photos from 2021/IMG_2662.JPG
[2/2] ./Google Fotos/Photos from 2021/IMG_2666.JPG.json : ./Google Fotos/Photos from 2021/IMG_2666.JPG
Found 2 unique files to process
Looks correct? [y/N] y
======== ./Google Fotos/Photos from 2021/IMG_2662.JPG [1/2]
Warning: Error opening file - ./Google Fotos/Photos from 2021/IMG_2662.JPG.json
Error: File not found - ./Google Fotos/Photos from 2021/IMG_2662.JPG
======== ./Google Fotos/Photos from 2021/IMG_2666.JPG [2/2]
Warning: Error opening file - ./Google Fotos/Photos from 2021/IMG_2666.JPG.json
Error: File not found - ./Google Fotos/Photos from 2021/IMG_2666.JPG
0 image files updated
2 files weren't updated due to errors
Delete all JSON files? [y/N] n
"
jq.exe and exiftool are installed and available via cmd.
thanks in advance.
I was hoping to use your script to process google photos takeout of 66215 photos.
The script crashes on Ubuntu 22.04 with jq 1.6
and exiftool 11.88-1ubuntu0.1
.
./google-photos-takeout.sh: line 82: /usr/bin/exiftool: Argument list too long
I've looked at exiftool forum and found this thread it suggests that there is a limit, and I guess it's less than 66.2k
If you have uploaded multiple files to Google which end up in the same folder in your Google Takeout that had the same original upload name, Google names the jpg and json files differently. This causes the google-photos-takeout.sh script to assign all identically named JSON files to the base jpg instead of a 1:1 mapping you'd expect.
Example:
I have four files named IMG_0484.JPG that I upload to Google Photos.
In my Google Takeout, I end up with four image files, IMG_0484.JPG, IMG_0484(1).JPG, IMG_0484(2).JPG, IMG_0484(3).JPG and four json files IMG_0484.JPG.json, IMG_0484.JPG(1).json, IMG_0484.JPG(2).json, IMG_0484.JPG(3).json,
google-photos-takeout.sh assigns as such:
[14120/129828] ./Photos from 2012/IMG_0484.JPG(1).json : ./Photos from 2012/IMG_0484.JPG
[14121/129828] ./Photos from 2012/IMG_0484.JPG(2).json : ./Photos from 2012/IMG_0484.JPG
[14122/129828] ./Photos from 2012/IMG_0484.JPG(3).json : ./Photos from 2012/IMG_0484.JPG
[14123/129828] ./Photos from 2012/IMG_0484.JPG.json : ./Photos from 2012/IMG_0484.JPG
This is what is expected:
[14120/129828] ./Photos from 2012/IMG_0484.JPG(1).json : ./Photos from 2012/IMG_0484(1).JPG
[14121/129828] ./Photos from 2012/IMG_0484.JPG(2).json : ./Photos from 2012/IMG_0484(2).JPG
[14122/129828] ./Photos from 2012/IMG_0484.JPG(3).json : ./Photos from 2012/IMG_0484(3).JPG
[14123/129828] ./Photos from 2012/IMG_0484.JPG.json : ./Photos from 2012/IMG_0484.JPG
This occurred for a huge number of my files since over the years many cameras from different families have been used which coincidentally had the same naming scheme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.