Skip to content

Python scripts to restore EXIF data of media files using .json files provided by Google Photos Takeout, also restore EXIF data of files with no .json files.

Notifications You must be signed in to change notification settings

postcumer/Google-Photos-Fixer

Repository files navigation


🚀 Google Photos Fixer

Python scripts to restore EXIF data of media files using .JSON files provided by Google Photos Takeout.

🛠️ Requirements

  • General:

    • Python 3.7+
    • pip (Python package installer)
  • For Debian-based systems:

    sudo apt update
    sudo apt install python3-full python3-pip exiftool
    pip3 install Pillow pyexiftool
  • For Arch-based systems:

    sudo pacman -Syu
    sudo pacman -S python-full python-pip exiftool
    pip install Pillow pyexiftool

📥 Downloading Google Photos Takeout

  1. Go to Google Takeout.
  2. Select the data you want to download. Make sure to include “Google Photos.”
  3. Choose your export options and click "Next."
  4. Click "Create export" and wait for the process to complete.
  5. Download the ZIP file containing your data.

📂 Extracting Takeout Data

  1. Move the downloaded ZIP file to your preferred directory, e.g., ~/Downloads.
  2. Extract the ZIP file to ~/takeout:
    mkdir -p ~/takeout
    unzip ~/Downloads/your_takeout_file.zip -d ~/takeout

📜 Usage

  1. Clone the repository:

    git clone https://github.com/postcumer/Google-Photos-Fixer
    cd Google-Photos-Fixer
  2. Run the scripts:

    python3 process_images.py
    python3 extract_dates.py
    python3 sorting.py (optional)
    python3 check_no_of_processed_images.py (optional)

🛠️ Troubleshooting

If the script doesn't work due to security issues, try running it in a Python virtual environment:

  1. Create a virtual environment:

    python3 -m venv myenv
  2. Activate the virtual environment:

    source myenv/bin/activate
  3. Install the required packages:

    pip install pyexiftool Pillow
  4. Run the scripts within the virtual environment.

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.


About

Python scripts to restore EXIF data of media files using .json files provided by Google Photos Takeout, also restore EXIF data of files with no .json files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages