RhetTbull / osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
MIT License
1.85k stars 94 forks source link

Add importer for Google Takeout #846

Open RhetTbull opened 1 year ago

RhetTbull commented 1 year ago

See this Reddit post

Would be useful to have an importer for osxphotos import that reads the Google takeout JSON and de-duplicates the import.

RhetTbull commented 1 year ago

Also, maybe add importer from Google Photos directly: https://developers.google.com/photos/library/guides/access-media-items

RhetTbull commented 1 month ago

osxphotos import can handle Google takeout:

If you have a Google Takeout archive of your Google Photos library, you can import it using the following
steps:

• Download the Google Takout archive from Google Photos
• Unzip the archive
• Run the following command to import the photos into Photos:

osxphotos import /path/to/Takeout --walk --album "{filepath.parent.name}" --sidecar --verbose --report
takeout_import.csv

If you have persons tagged in Google Photos you can add this option to create keywords for each person in the photo: --keyword "{person}"

Google Takeout does not preserve the timezone of the photo. The metadata JSON sidecar produced by Google
converts photo times to UTC. The import command will convert these to the correct time in the local timezone
upon import. If your photos contain the correct date/time and timezone information in the metadata you can use the --sidecar-ignore-date option to ignore the date/time in the sidecar and use the date/time from the photo
metadata.