github Wacheee/GooglePhotosTakeoutHelper v4.0.1-wacheee-Xentraxx-beta

pre-release3 months ago

Fork/Alternate version

This change is a big overhaul of the project, so only the major improvements or potential breaking changes are mentioned

This version was developed mainly by @Xentraxx (https://github.com/Xentraxx/)

Tl;dr

  • Added support for reading EXIF data from JXL (JPEG XL), ARW, RAW, DNG, CRW, CR3, NRW, NEF and RAF files internally.
  • Adeded support for reading and writing coordinates and DateTime from and to exif for almost all file formats.
  • Added a "--write-exif" flag which will write missing EXIF information (coordinates and DateTime) from json to EXIF for jpg and jpeg files
  • Added support to get DateTime from .MOV, .MP4 and probably many other video formats through exiftool. You need to download it yourself (e.g. from here: https://exiftool.org/), rename it to exiftool.exe and make sure the folder you keep it in is in your $PATH variable or in the same folder as gpth.
  • Added verbose mode (--verbose or -v)
  • File size is not limited anymore by default but can be limited using the --limit-filesize flag for systems with low RAM (like a NAS).
  • Fixed PhotoMigrator integration by finding exiftool in more locations.
  • Fixed some typos
  • Fixed emoji to hex encoding and decoding and added support for BMP emojis in addition to surrowgate.
  • Fixed some tests

General improvements

  • upgraded dependencies and fixed breaking changes
  • updated dart to a minimum version of 3.8.0 of the dart SDK
  • included image, intl and coordinate_converter packages
  • applied a list of coding best practices through lint rules to code
  • added/edited a bunch of comments and changed unnecessary print() to log() for debugging and a better user experience
  • Divided code in steps through comments and included steps in output for readability, debuggability and to make it easier to follow the code
  • checked TODOs in README.md
  • Added TODOs to look into in code through //TODO comments
  • moved json_extractor file into date_extractor folder
  • added unit tests for new write-exif functionality
  • made CLI --help output more readable through line breaks
  • renamed some variables/functions to better reflect their purpose
  • moved step 8 (update creation time) before final output
  • added output how often DateTime and Coordinates have been written in EXIF at the final output
  • changed that test data will be created in test subfolder instead of project root directory
  • Added consistent log levels to log output to quickly differenciate between informational and error logs
  • Added logging of elapsed time for each step.
  • Exposed the maxFileSize flag as an argument (--limit-filesize) to set if necessary, It's now deactivated by default to support larger files like videos.
  • Added DateTime extraction method statistics to the final output - shows how many files had their dates extracted through which method
  • Added elapsed time logging for each processing step
  • Improved Github actions

Bug fixes

  • fixed existing unit tests which would fail on windows
  • Fixed Github Actions

Added functionality

  • Support for writing coordinates and DateTime to EXIF

    • Added new CLI option "--write-exif".
    • When enabled, the script will check if the associated json of any given file contains coordinates and if the file does not yet have them in its EXIF data, the script will add them.
    • When enabled, the script will check if a DateTime has been extracted from any of the given extraction methods and if the file has no EXIF DateTime set, it will add the DateTime to the EXIF data 'DateTime', 'DateTimeOriginal'and 'DateTimeDigitized'.
    • Added verbose mode (--verbose or -v) with log levels info, warning and error.
  • Moved from the stale "exif" package to "exif_reader" for dart local exif reading, the image library for local jpeg exif writing and the external exiftool for all other EXIF reading and writing (images and videos)

    • The move to exif_reader adds support for extracting DateTime from JXL (JPEG XL), ARW, RAW, DNG, CRW, CR3, NRW, NEF and RAF files, and video formats like MOV, MP4, etc.
    • Exiftool needs to be in $PATH variable or in the same folder as the running binary. If not, that's okay. Then we fall back to exif_reader. But if you have ExifTool locally, Google Photos Takeout Helper now supports reading CreatedDateTime EXIF data for almost all media formats.
  • Added new interactive prompts:

    • Option to write EXIF data to files (--write-exif)
    • Option to limit file size for systems with low RAM (--limit-filesize)

Limitations

  • As mentioned on the PR #13 (comment) this version can be slower than 3.6.x-wacheee in Windows because is using PowerShell to create shortcuts (FFI is causing heap exception)

Previous fixes and improvements
Previous fixes and improvement (from 3.4.3-wacheee to 4.0.0-wacheee)
  • added macOS executables supporting both ARM64 and Intel architectures TheLastGimbus#310 TheLastGimbus#396 (comment)
  • fixed an exception when using GPTH with command-line arguments #5 #8
  • the "fix JSON metadata files" option can now be configured using command-line arguments #7 #9
  • if shortcut option is selected, shortcut creation will be 10 times faster on Windows platforms (new creation method that avoids using PowerShell). For more details: TheLastGimbus#390
  • fixed issues with folder names containing emojis πŸ’–πŸ€–πŸš€on Windows TheLastGimbus#389
  • added an interactive option to update the creation times of files in the output folder to match their last modified times at the end of the program (only on Windows) TheLastGimbus#371
  • if a media is not in a year folder it establishes one from an album to move it to ALL_PHOTOS correctly. This will move the original media file directly from the album (or one of those albums) to ALL_PHOTOS and create a shortcut in the output album folder (if shortcut option is selected) TheLastGimbus#261
  • added support for moving or copying files with the following extensions to the output folder: .MP, .MV, .DNG, and .CR2 TheLastGimbus#381 TheLastGimbus#324 TheLastGimbus#180 TheLastGimbus#271
  • added an interactive option to convert Pixel Motion Photo files (.MP or .MV) to .mp4
  • added an option to remove the "supplemental-metadata" suffix from JSON to prevent issues with metadata TheLastGimbus#353 TheLastGimbus#355
  • fixed shortcut issue on Windows platforms TheLastGimbus#248
  • added more options for date-based folders [year, month, day] TheLastGimbus#238 (based in this commit More granular date folders #299)
  • added reverse-shortcut option, now you can mantain original photo in album folders and create a shortcut in year albums
Limitations:
  • if album mode is set to duplicate-copy, it will move the album photos to the album folder (as usual), but ALL_PHOTOS will not contain them if the media is not in a year album.
  • it does not fix issues related to reading JSON files (if necessary) for Motion Photo files; however, if the dates are included in the file name (as with Pixel Motion Photos), the correct dates will be established.
  • No interactive unzipping

Don't miss a new GooglePhotosTakeoutHelper release

NewReleases is sending notifications on new releases.