https://github.com/alecrust/gphotos-takeout-repair
Organize Google Photos exports created with Takeout.
https://github.com/alecrust/gphotos-takeout-repair
google-photos google-takeout
Last synced: 5 months ago
JSON representation
Organize Google Photos exports created with Takeout.
- Host: GitHub
- URL: https://github.com/alecrust/gphotos-takeout-repair
- Owner: AlecRust
- License: mit
- Created: 2023-10-25T22:00:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-23T10:43:08.000Z (9 months ago)
- Last Synced: 2025-07-07T08:19:11.685Z (5 months ago)
- Topics: google-photos, google-takeout
- Language: JavaScript
- Homepage: https://npm.im/gphotos-takeout-repair
- Size: 1.3 MB
- Stars: 22
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gphotos-takeout-repair [](https://github.com/AlecRust/gphotos-takeout-repair/actions/workflows/ci.yml) [](https://www.npmjs.com/package/gphotos-takeout-repair)
> Organize a Google Photos export (created with [Takeout](https://takeout.google.com/)) 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](./src/index.test.js))
## Install
```sh
npm install -g gphotos-takeout-repair
```
## Usage
```sh
gphotos-takeout-repair --src ./unzipped-takeout-dir --dest ./output-dir
```
## Related
- https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper
- https://github.com/m1rkwood/google-photos-takeout-scripts
- https://github.com/mattwilson1024/google-photos-exif
- https://github.com/garzj/google-photos-migrate