npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

exiftool2

0.0.4 • Public • Published

Exiftool2

NPM version NPM downloads Build status Test coverage

Wrapper for efficiently working with exiftool.

Installation

npm install exiftool2 --save

Usage

import { exec, open } from 'exiftool2'
 
// Pass arguments to create an instance of `exiftool` parsing.
// Default arguments: -q -json
// Read more: http://linux.die.net/man/1/exiftool
const exif = exec(['-fast', 'placeholder.png'])
 
// The `exif` result is always an array of exif objects from `exiftool`.
exif.on('exif', ...)
exif.on('error', ...)
 
// Supports streaming into `exiftool`.
const exif = exec(['-fast', '-'])
 
// Remember you can close the connection early on exif data.
exif.on('exif', ...)
 
// Pipe directly into `exiftool` (E.g. over HTTP).
createReadStream('placeholder.png').pipe(exif)
 
// Create an instance that defaults to `-stay_open`.
// Identical to `exec`, except for the default arguments.
// Default arguments: -stay_open True -@ -
const exif = open(['-fast', 'placeholder.png'])
 
// Multiple `exif` events will emit in `open` mode.
exif.on('exif', ...)
 
// Push commands to `-execute`. Prepends `-q -json` to each `send()`.
exif.send(['placeholder.png'])
 
// You also also stream with `-stay_open`.
// Both `send` and `stream` accept a callback as the second argument.
createReadStream('placeholder.png').pipe(exif.stream())
 
// Sends `-stay_open False`, causing `exiftool` to close.
exif.close()

License

Apache 2.0

install

npm i exiftool2

Downloadsweekly downloads

7

version

0.0.4

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability