How anderbggo/googlephotosmatcher works
Project Type and Purpose
• This is a standalone desktop application (packaged as an executable, GPMatcher.exe) designed to update image/video files with metadata extracted from accompanying JSON files.
• Its primary function is to process downloaded Google Photos content, match JSON metadata with corresponding media, and output the updated files into designated folders (Matched and EditedRaw).
Main Components
a. User Interface (UI)
• Represented primarily by the contents of files/window.py.
• This component handles user interactions like selecting the download folder and triggering the matching process.
b. Application Controller/Engine
• Represented by files/main.py which likely acts as the entry point. It integrates the UI with the core business logic.
• It coordinates the overall flow when the executable (GPMatcher.exe) is launched.
c. Core Matching Logic
• Encapsulated in files/auxFunctions.py which contains the algorithm used to match JSON data with image/video metadata.
• This module handles parsing of JSON, reading media file attributes, and performing the matching and renaming operations.
d. File System and I/O Operations
• Input: User-selected folder containing both JSON files and media files.
• Outputs: Creation of the “Matched” and “EditedRaw” folders for storing processed files.
e. External Dependencies/Resources
• Though minimal, include the user’s file browser interaction (such as folder selection) and the underlying file system operations (reading and writing to disk).
Relationships and Interactions
• The UI forwards user actions to the Controller (main.py), which in turn calls the Core Matching Logic (auxFunctions.py).
• The Core Matching Logic interacts with the file system: reading JSON metadata and image/video files, performing look-ups, and then writing the updated files into the “Matched” (and, if applicable, “EditedRaw”) folders.
• Optionally, feedback from the matching process is relayed back to the UI to update the user regarding the success or any issues (for example, unmatched cases due to special characters).
Technologies/Frameworks to Mention
• Python as the programming language (as inferred from .py files).
• Likely used GUI toolkit in files/window.py (could be Tkinter, PyQt or similar), though the exact framework isn’t mentioned – indicate it as “GUI Framework.”
• File system operations through standard Python libraries.