TheLastGimbus / GooglePhotosTakeoutHelper

Script that organizes the Google Takeout archive into one big chronological folder
https://aur.archlinux.org/packages/gpth-bin
Apache License 2.0
3.47k stars 176 forks source link
exif exif-data google-photos google-takeout json python-scripts

AUR total Github Releases downloads latest version downloads resolved Github issues commit activity

Google Photos Takeout Helper πŸ“ΈπŸ†˜

What is this for 🧐

If you ever want to move from Google Photos to other platform/solution, your fastest choice to export all photos is Google Takeout πŸ₯‘

But when you download it, you will find yourself with zips with hundreds of little folders with weird .json files inside 🍝. What if you want to just have one folder with all photos, in chronological order? Good luck copying all of that πŸ™ƒ

This script does just that - it organizes and cleans up your Takeout for you 🧹😌

It will take all of those folders, find all photos in them, set their and file last modified correctly, and put it in one big folder (or folders divided by a month) πŸ—„

How to use:

Since v3.2.0, gpth is interactive πŸŽ‰ - you don't need to type any complicated arguments - just get your takeout, run gpth, and follow prompted instructions πŸ’ƒ

If you want to run it on Synology, have problems with interactive, or just love cmd, look at "Running manually with cmd". Otherwise, just:

1. Get all your photos from Google Takeout πŸ“₯

"deselect all" and then select only Google Photos

gpth usage image tutorial

2. Unzip them all and merge into one, so that all "Takeout" folders become one

NOTE: Keep those original zips, you may need them if anything goes wrong

Unzip image tutorial

3. Download the executable for your system from releases tab πŸ›’ (also available on AUR 😏)

4. Run gpth

5. Most of your photos should have correct original EXIFs (metadata), but if you want, you can insert them everywhere with exiftool, so you won't lose their creation time

Done! Enjoy your photos!!!

Running manually with cmd

You may still need this mode if:

In that case:

  1. Manually unzip all your takeout zips and merge them into one folder
  2. Open cmd and:
    • For windoza:
      # psst: in windoza cmd, you can just drag and drop files/folders to type them in
      # 1. change working directory to where gpth.exe is:
      cd Downloads  # Most probably
      # run it, selecting input and output folders with options like this:
      # (you can try to drag and drop them)
      gpth.exe --input "Downloads\you\input\folder" --output "C:\some\other\location" --albums "shortcut"
      # select which album solution you like - see --help for all of them
      # remember to use "" !
    • For Linux/macOS:
      # ssh/whatever to where you're running it
      cd Downloads  # folder with gpth
      chmod +x gpth  # add execute permission
      # tell MacOS Gatekeeper to not worry
      xattr -r -d com.apple.quarantine gpth-macos
      ./gpth --input "/some/input/folder" --output "other/output/folder" --albums "shortcut"
      # select which album solution you like - see --help for all of them

You can check all cmd flags by running gpth --help - for example, the --divide-to-dates flag

If I helped you, you can consider donating me β˜•

I spent a lot of time fixing bugs and making this work stable πŸ’– - would be super thankful for any donations πŸ₯°

Donate Donate using ko-fi Donate using Liberapay

After exporting πŸ€”

Be aware if you move your photos on your Android phone... ☝

(99% of the times), if you move some files in Android, their creation and modification time is reset to current.

"Simple Gallery" app usually keeps original file creation time when moving and copying (but I don't guarantee it). It's also pretty cool - check it out: https://github.com/SimpleMobileTools/Simple-Gallery

What to do when you got rid of Google Photos? What are the alternatives? πŸ—Ί

Other Takeout projects

I used this tool to export my notes to markdown - you can then edit them with any markdown editor you like :)

https://github.com/vHanda/google-keep-exporter

Where is the Python script 🐍 ??

Yeah, the whole thing got re-written in Dart, and now it's way more stable and faster. If you still want Python for some reason, check out v2.x - in releases/tags

TODO (Pull Requests welcome):