Git Product home page Git Product logo

googletakeoutmetadatafix's Introduction

Google Photos & Drive Takeout Metadata Fix

Python Platform License

Overview

This simple Python script helps you clean up your Google Photos/Drive export by updating the creation time of your files to the original creation time from the JSON files. Tt removes the JSON files after processing. Additionally, the script can search all directories within the given directory if you want. Other information in the JSON files is now discarded, maybe in the future I'll implement all the other data.

Issues with Google Drive cleaning

If you pass a Google Drive takeout directory, it sometimes doesn't work for all of the files. This is because sometimes the filenames of the JSON files are quite different compared to the original file. You can try to add some specific patterns to the process_file function in the array json_paths.

Prerequisites

  • Python 3 or higher
  • pywin32 library for Windows file time modification (Windows only)

Installation

Step 1: Clone the repository

git clone https://github.com/Tommaso6468/GoogleTakeoutMetadataFix.git
cd GoogleTakeoutMetadataFix

Step 2: Install dependencies (Windows only)

pip install pywin32

Usage

Command line arguments

The script accepts multiple directories as arguments. Use directories given by Google Takeout, you can give a small directory or the entire takeout directory.

Example command

python windows.py "/path/to/your/directory" "/path/to/your/directory"

Script execution

  1. Open a terminal or command prompt
  2. Navigate to the directory where you cloned the repository
  3. Run the script for your OS with the desired directories as arguments
  4. Choose if you want to search all subdirectories. This way, if you pass the entire Takeout directory, it can search all the directories inside and the directories inside those

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

googletakeoutmetadatafix's People

Contributors

tommaso6468 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.