Simple command line tool for displaying EXIF data attributes for a specific image.
Displays:
- by default: only the "date" attributes in a given image's EXIF data
- with -h: all attributes in a given image's EXIF data
- with -z: "date" attributes as is, and also converted to UTC and a specified timezone
Latest version: 1.0.1 is Stable, ready for use.
Ensure you have node installed. v20 or better.
Clone the repo to a local directory.
Change into that directory.
Use npm to install the application.
git clone https://github.com/adrianparker/ExifCmdLine.git
cd ExifCmdLine
npm install
Follow above instructions for local installation, then execute
npm install -g ././exifcmdline
Note: if you have installed ExifCmdLine globally, these examples should work from any directory.
Scenario: You aren't sure when a photo was taken, and want to see what dates are recorded in the photo's EXIF data.
ExifCmdLine -f /path/to/image.jpg
In this example, I have an image and the file system tells me it has a date of 16 September 2020. I thought it was earlier that that though, and sure enough - ExifCmdLine shows it has date attributes of 7 Feb 2019!
(Also note inconsistent times in that EXIF data, we'll come back to that in a second)
Green is converted to a human readable date; purple is ISO8601 format.
Scenario: You are curious about all the data recorded in a photo.
ExifCmdLine -a -f /path/to/image.jpg
Same photo, far more comprehensive EXIF data.
We can see Lens data, and Camera Make and Model, and... whatever the camera or post-capture software appended.
Recall the inconsistent modified date in the Basic usage above? Here we see a Software tag for Adobe Lightroom - and so we can surmise the photo was taken at 12:31pm, then touched up ("modified") in Lightroom at 1.40pm. Nice!
Note: EXIF data varies. Different photos will have different sets of attributes; some photos have no EXIF at all - particularly if they've been through a social media, email or messaging app.
Scenario: a photo was taken by a device that had the wrong timezone set.
ExifCmdLine -z Asia/Tokyo -f /path/to/image.jpg
Pass the relevant 'tz' timezone code to the -z command line argument.
This will display each date attribute unconverted (NO ZONE), converted to UTC, and converted to the timezone you specified.
Exercise caution with this one, devices can automatically infer timezone from GPS or Wi-Fi or myriad other sources.
ExifCmdLine --version
ExifCmdLine -h
npm test
Fire in a pull request by all means. Please adhere to Javascript Standard Style: https://standardjs.com/rules.html