Giter Site home page Giter Site logo

toastymallows / hourshifter Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 50 KB

Simple command-line utility to shift the DateTaken EXIF metadata (ID 36867) of images by a number of hours.

License: Apache License 2.0

C# 98.40% PowerShell 0.95% Shell 0.65%
metadata images datetime utility command-line-tool windows powershell cmd jpg shifter visual-studio csharp csharp-code datetaken exif-metadata exif exiftool exif-data

hourshifter's Introduction

HourShifter

Simple command-line utility to shift the DateTaken EXIF metadata (ID 36867) of Jpeg images by a number of hours.

Dependencies

Windows

None

Unix

  • libgdiplus
  • libc6-dev

MacOS

None? Using runtime.osx.10.10-x64.CoreCompat.System.Drawing

Compiling

Currently targeting .NET 5.

Windows

  • > .\build.ps1 (RID "win-x64" is the default)

Unix

⚠ This application currently does not work on Unix-based systems because of this bug.

  • > ./build.sh --rid="linux-x64"

MacOS

⚠ This application currently does not work on MacOS systems because of this bug.

  • > ./build.sh --rid="osx-x64"

Debugging

⚠ In order to debug you need to find/replace $(RID) and replace it with the current operating system's RID that you're targeting. See the full list of runtime identifiers (RIDs) here: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog

Publishing

Create a self-contained release for a certain RID:

Windows

  • > .\build.ps1 --target=Publish (RID "win-x64" is the default)

Linux

  • > chmod +r build.sh
  • > ./build.sh --target=Publish --rid="linux-x64"

MacOS

  • > chmod +r build.sh
  • > ./build.sh --target=Publish --rid="osx-x64"

NOTE: See the full list of runtime identifiers (RIDs) here: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog

Check Releases on Github for the pre-compiled release for your operating system. If your specific release isn't pre-built, pull down the code and build it locally.

Command-line Arguments

  • -h, --hours

    • Will shift all image DateTaken EXIF metadata found in the current directory and all subdirectories by a number of hours. The default value is 12.
    • Ex:
      • -h 5
      • -h -2
  • -c, --currentDirectoryOnly

    • Flag for only searching the current directory, NOT subdirectories. The default is false (subdirectories WILL be searched.)
  • -l, --logLevel

    • Flag to control the log level of the application. Default: Info. Acceptable values: Debug, Info, Warn, Error
  • -q, --quiet

    • Flag for showing any output or waiting to press any key to exit. Program will run and exit immediately without any output. Log level is ignored.
  • --help

    • Displays help screen.
  • --version

    • Displays version information.

Why?

While importing pictures scanned with the Epson FastFoto FF-640 to Google Photos, I noticed that the DateTaken EXIF metadata was defaulted to a time of 00:00, but that the Date was correct. When uploaded to Google Photos, it thought that the Time Zone was Central, which meant that all of the photos were showing a taken date of the previous day. Windows doesn't seem to let you modify the time of the DateTaken value, so this was my quick solution.

Problems?

Submit an issue or pull request 😃

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.