Python scripts to restore EXIF data of media files using .JSON files provided by Google Photos Takeout.
-
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
- Go to Google Takeout.
- Select the data you want to download. Make sure to include “Google Photos.”
- Choose your export options and click "Next."
- Click "Create export" and wait for the process to complete.
- Download the ZIP file containing your data.
- Move the downloaded ZIP file to your preferred directory, e.g.,
~/Downloads
. - Extract the ZIP file to
~/takeout
:mkdir -p ~/takeout unzip ~/Downloads/your_takeout_file.zip -d ~/takeout
-
Clone the repository:
git clone https://github.com/postcumer/Google-Photos-Fixer cd Google-Photos-Fixer
-
Run the scripts:
python3 process_images.py python3 extract_dates.py python3 sorting.py (optional) python3 check_no_of_processed_images.py (optional)
If the script doesn't work due to security issues, try running it in a Python virtual environment:
-
Create a virtual environment:
python3 -m venv myenv
-
Activate the virtual environment:
source myenv/bin/activate
-
Install the required packages:
pip install pyexiftool Pillow
-
Run the scripts within the virtual environment.
This project is licensed under the MIT License. See the LICENSE file for details.