{"id":14010511,"url":"https://github.com/adiRandom/google-photos-timestamper","last_synced_at":"2025-07-24T17:32:15.146Z","repository":{"id":98902200,"uuid":"597437388","full_name":"adiRandom/google-photos-timestamper","owner":"adiRandom","description":"Fix the creation time of the photos exported by Google takeout using the metadata stored in the associated JSONs","archived":false,"fork":false,"pushed_at":"2023-02-04T22:50:02.000Z","size":9,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T23:47:20.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adiRandom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T14:53:31.000Z","updated_at":"2025-07-20T16:16:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6c404af-9537-4535-9e4c-7fc0646a4e41","html_url":"https://github.com/adiRandom/google-photos-timestamper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adiRandom/google-photos-timestamper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiRandom%2Fgoogle-photos-timestamper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiRandom%2Fgoogle-photos-timestamper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiRandom%2Fgoogle-photos-timestamper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiRandom%2Fgoogle-photos-timestamper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adiRandom","download_url":"https://codeload.github.com/adiRandom/google-photos-timestamper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiRandom%2Fgoogle-photos-timestamper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266878577,"owners_count":23999620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-10T16:01:02.740Z","updated_at":"2025-07-24T17:32:15.130Z","avatar_url":"https://github.com/adiRandom.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# google-photos-timestamper\n\nUsign [Google Takeout](https://takeout.google.com/settings/takeout) you can export your photos saved in Google Photos to migrate wherever else you want\nHowever, the while on google servers, the metadata from the files gets stripped from the images and put in separate JSONs. \n\nThis script is meant to add back the creation time of the images from their associated JSON files.\nThe script can be easily modified to extract any piece of metadata from the image json. This can be done by updating the `update_image_metadata` function\n\n## Before running\nBefore running the script I suggest downloading all the images you want to pull of Google Photos and running the script once for all of them. \nI noticed that Google Takeout doesn't make sure thatboth the image and it's json file are in the same archive from the split download. \n\nIf you run the script on each archive at a time you might end up with photos that weren't fixed.\n\n\n## Usage\n\nJust call the script with the path to the folder holding images. The script will recursively look for images and associated json files in the provided path.\n\n`main.py path/to.images`\n\n\n**Note**\n\nThe script expects that the folders searched only contain image files and their associated jsons. \nThere is no filtering in place to only look for image file extensions\n\n\n## JSON naming\n\nAt first, it lookes like for each `Image.ext` there is an associated `Image.ext.json` file. \nHowever, while working on this I encoutered differet namings and included rules for them:\n\n1. Duplicate files\n\nIf you have 2 images with the same name `Image.jpeg`, on your disk you'll have `Image.jpeg` and `Image(1).jpeg`. \nHowever, the JSON files will be names `Image.jpeg.json` and `Image.jpeg(1).json`\n\n2. Edited images\n\nEdited images from Google Photos get the `-Edited` suffix. But they don't also get an associated JSON. Instead they have the JSON of the original photo.\nSo `Image-Editate.jpeg` will have its metadata in `Image.jpeg.json`\n\n3. JSON Names that don't perfectly match the name of the image\n\nThis rule might not apply to you. I think due to some wierd Mac OS bug I ended up with some JSON files that also contained some timestamps in their names.\nSo I included a rule that given an image that has no perfect match for its json after checking the above 2 rules, \nit looks for the first JSON file that contains the name of the image file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FadiRandom%2Fgoogle-photos-timestamper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FadiRandom%2Fgoogle-photos-timestamper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FadiRandom%2Fgoogle-photos-timestamper/lists"}