A Rust tool which will intake a Google Takeout archive and copy all files to a new directory, with exif data applied.
This tool was largely hacked together in a weekend for my needs, if you found it useful please let me know and I'll be happy to improve it by adding a proper CLI, documentation, and refactoring the code to be a lot more idiomatic.
The output directory will loop as follows:
> tree output
/output
/output/general/:photos # all photos that are not in an album or shared album
/output/shared/shared/:photos # all photos in shared albums are merged into a single directory
/output/albums/:albumname/:photos
These can then easily be uploaded to Immich using the following commands:
immich upload --key API_KEY --server SERVER_URL -d ./albums --album
immich upload --key API_KEY --server SERVER_URL -d ./shared --album
immich upload --key API_KEY --server SERVER_URL -d ./general
This tool is multithreaded, and does all of the following steps:
- Matching up files to their JSON counterparts
- Using exiftool internally to apply exif data to the files
- Removing duplicate files
- Correcting incorrect file extensions (if you use the compression setting in Google Photos this is almost certain to be required)
- Adding identifiers to non-unique filenames
- Copying files to the output directory
cd gdog && cargo build --release
./target/release/gdog
USAGE:
immich-exif-for-google-takeout <input> <output>