exifier

1.0.0 • Public • Published

exifier

Transform stream which reads generic image filenames and writes both the generic src and the dest filenames with EXIF creation dates.

build status dependency status dev dependency status

Example

var exifier = require('exifier')('%Y/%m/%d_%H-%M-%S');
 
exifier.on('data', function(obj) {
  console.log('exified:', obj);
});
 
exifier.on('skip', function (err) {
  console.error('skipped:', err);
});
 
exifier.write('test/img/hasselblad.jpg');
exifier.write('README.md');

Methods

var exifier = require('exifier')(pattern, opts);

Return a transform stream which reads file paths and writes {src: '', dest: ''} objects based on the given strftime(3) compatible pattern.

A cryptographic hash is appended to the dest name if an optional {hash: true} opts object is passed.

Events

s.on('skip', function (err) {})

For every unparsable file this event fires.

Installation

Install the exiv2 library and headers with your platform's native package manager:

apt-get install libexiv2 libexiv2-dev
brew install pkg-config exiv2
pacman -S exiv2

Install the NPM module:

npm install exifier

License

MIT

Dependents (1)

Package Sidebar

Install

npm i exifier

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • uggedal