-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 37e0a04
Showing
11 changed files
with
6,856 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": ["eslint:recommended", "prettier"], | ||
"parserOptions": { | ||
"ecmaVersion": 2021 | ||
}, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run linter | ||
run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
printWidth: 120 | ||
overrides: | ||
- files: "*.js" | ||
options: | ||
singleQuote: true | ||
semi: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hooks": { | ||
"before:init": "npm run lint" | ||
}, | ||
"git": { | ||
"commitArgs": ["-S"], | ||
"tagArgs": ["-s"] | ||
}, | ||
"npm": { | ||
"publish": true | ||
}, | ||
"github": { | ||
"release": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# gphotos-takeout-repair [![CI](https://github.com/AlecRust/gphotos-takeout-repair/actions/workflows/ci.yml/badge.svg)](https://github.com/AlecRust/gphotos-takeout-repair/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/gphotos-takeout-repair.svg)](https://badge.fury.io/js/gphotos-takeout-repair) | ||
|
||
Transform a Google Photos export (created with [Takeout](https://takeout.google.com/)) into a more useful folder(s) of images. | ||
|
||
The output is folder of files (with folder structure retained) suitable for use as a traditional photo library, where there are no JSON files, no "edited" versions, and the files have suitable `Date Created` timestamps. | ||
|
||
For example the following files within 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.json | Takeout export date | Metadata information for file | | ||
|
||
Will result in the following file output to the destination directory: | ||
|
||
| Filename | Date Created | Description | | ||
| ------------ | ---------------------------- | -------------------------- | | ||
| IMG_0001.JPG | "Photo taken" date from JSON | Edited version of the file | | ||
|
||
## Features | ||
|
||
- Copies files to destination directory using timestamp from the JSON file | ||
- Selects the best version to copy i.e. "edited" version over original | ||
- Retains source directory folder structure to handle Takeout's exporting of albums | ||
- Handles some common Takeout export filename and encoding issues | ||
|
||
## Installation | ||
|
||
```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/mattwilson1024/google-photos-exif |
Oops, something went wrong.