Skip to content
Matthew McEachen edited this page Apr 20, 2019 · 6 revisions

Where do you get your tag entries from?

Tags.ts is created by the npm mktags script. The samples I've run it against come from a cached copy of ExifTool's samples. These files have all the metadata of the original files, but the images or videos are replaced with a 1x1 pixel image.

Please note: only the tags found in these ~6k of images are included in Tags.ts.

If you find that you're missing tags, feel free to submit a pull request that adds a tags-only* file to the examples directory, and I can rebuild the tags file, including the new tags.

* By "tags-only", I ask that you strip the file of content other than the metadata headers, if that's possible, in the interests of keeping the source tree reasonably small. See other test images for examples.

I'd like to run an ExifTool command over all the files in my folder directory

Before you embark on this journey, make sure you've read ExifTool's Fine Documentation, especially item #3 on this page. What you want done could very well be a (short!) single exiftool command.

See this conversation for more details.

How do you make this work with electron?

Electron is notoriously brittle and buggy, and is not officially supported by this package. Although PhotoStructure uses this package within electron, there's a nontrivial amount of auxiliary support code specific to that project to make it work smoothly.

If you're still anxious to try, here are some things to keep in mind:

  1. Note that this package will spawn exiftool external processes, which means the exiftool-vendored.pl and exiftool-vendored.exe packages should be included in your asarUnpack. SmartUnpack might work, but if it doesn't use a pattern like node_modules/{exiftool-vendored.*}/**/*.

  2. If you're requiring exiftool-vendored from within a webview, you're gonna have a bad time. Many things won't work due to a lack of node compatibility within electron.

  3. __dirname at runtime from within an asar package after webpacking will be invalid, so don't rely on that.

See #17 and #47.

I've got a webpack error

As with all native modules, make sure you add node_modules/exiftool-vendored.* to your externals. See webpack-node-externals.

How do I use a config file?

Update your exiftoolArgs.

Clone this wiki locally