Sobesednik / node-exiftool

A Node.js interface to exiftool command-line application.
MIT License
91 stars 15 forks source link

readMetadata options not working #48

Closed ndtreviv closed 4 years ago

ndtreviv commented 5 years ago

If I extract with OPTIONS:

const OPTIONS = [
  "-u",
  "-F",
  "-c",
  "%+.5f",
  "GPSLatitude",
  "GPSLongitude",
  "GPSLatitudeRef",
  "GPSLongitudeRef"
];

...

ep.readMetadata(filePath, OPTIONS)

then it doesn't format the GPS Longitude correctly - the -c %+.5f gets ignored.

I've also tried combining the two into a single array entry with no joy.

I also want -F and -u to work.

zavr-1 commented 5 years ago

hi i'll have a look today sorry i'm super busy i do see your messages

ndtreviv commented 5 years ago

No worries - at the moment I'm modifying my local copy of the lib.js file so that line 69 says this:

        ['-json', '-s', '-u', '-F', '-c', '%+.5f'],

but I'd love to be able to pass these options in. If I get time next week I'll do a PR or something.

ndtreviv commented 4 years ago

I'd also like to be able to pass -g to group output properties into their relevant areas.

ndtreviv commented 4 years ago

Figured it out.

To pass the extra options, just do it like all the others (ie: without the -). For -c though put the format in the same string but include a space:

ep.readMetadata(image, ["g", "F", "u", "c %+.5f"])