Skip to content

AlecRust/gphotos-takeout-repair

Repository files navigation

gphotos-takeout-repair CI npm version

Organize a Google Photos export (created with Takeout) into a useful directory of files.

The output is a directory of files (with folder structure retained) suitable for use as a traditional photo library, where there are no JSON files or duplicate "edited" versions, and files have suitable Date Created timestamps.

For example given the following files in the source directory:

Filename Date Created Description
IMG_0001-edited.jpg Takeout export date Edited version of the file
IMG_0001.jpg Takeout export date Original version of the file
IMG_0001.jpg.json Takeout export date Metadata information for file
IMG_0002.mp4 Takeout export date Original version of the file
IMG_0002.mp4.json Takeout export date Metadata information for file

The output in the destination directory will be:

Filename Date Created Description
IMG_0001.jpg "Photo taken" date from JSON Edited version of the file
IMG_0002.mp4 "Photo taken" date from JSON Original version of the file

Features

  • Copies files to destination directory using photoTakenTime from the JSON file
  • Copies the (usually best) "edited" version where possible to prevent duplicates
  • Retains source directory folder structure to handle Takeout's exporting of albums
  • Handles many common Takeout export filename and encoding issues (view tests)

Install

npm install -g gphotos-takeout-repair

Usage

gphotos-takeout-repair --src ./unzipped-takeout-dir --dest ./output-dir

Related