Comparing version 1.1.0 to 1.1.1
@@ -5,5 +5,8 @@ const extractd = require('../extractd'); | ||
const done = await extractd.generate('nikon_d850_01.nef'); | ||
const done = await extractd.generate('nikon_d850_01.nef', { | ||
destination: '/my/new/directory/' | ||
}); | ||
console.dir(done); | ||
})(); |
@@ -72,6 +72,12 @@ const fs = require('fs'); | ||
if (typeof options !== 'object') { | ||
return main = { | ||
error: `Expected options object got ${typeof options} instead` | ||
}; | ||
} | ||
if (!options.destination) { | ||
options.destination = temp; | ||
} else { | ||
options.destination = path.normalize(options.destination); | ||
options.destination = path.resolve(options.destination); | ||
} | ||
@@ -78,0 +84,0 @@ |
{ | ||
"name": "extractd", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Extract previews from DSLR and mirrorless cameras' RAW files", | ||
@@ -5,0 +5,0 @@ "main": "extractd.js", |
@@ -24,3 +24,3 @@ # extractd | ||
- **compact** `optional (boolean)` - returns compact list of the preview files (defaults to false). | ||
- **destination** `optional (string)` - directory where preview image will be saved (defaults to RAW image directory). | ||
- **destination** `optional (string)` - directory where preview image will be saved to; if destination does not exists it will be created (defaults to OS temp directory). | ||
- **stream** `optional (boolean)` - by default `exif` process generates the preview file in the temp directory in the OS or in `destination` if provided; once enabled `preview` is returned as a readeble stream which source will by automatically deleted after fully piped (defaults to false). | ||
@@ -53,6 +53,9 @@ - **persist** `optional (boolean)` - by default `exif` process will be initialised and killed of per extractd call; with `persist` enabled same `exif` process can be used across all calls for single file and batch processing (defaults to false). | ||
### Persistent status check | ||
```js | ||
const done = await extractd.generate('/directory/nikon_d850_01.nef', { | ||
persist: true | ||
persist: true, | ||
destination: '/directory/' | ||
}); | ||
@@ -64,2 +67,11 @@ | ||
Response `done (object)` will be similar to: | ||
```js | ||
{ | ||
preview: '/directory/nikon_d850_01.jpg', | ||
source: '/directory/nikon_d850_01.nef' | ||
} | ||
``` | ||
Response `status (object)` will be similar to: | ||
@@ -73,3 +85,3 @@ | ||
- persistent - status indicates that `exif` process is already live and calls can join in | ||
- persistent - status indicates that `exif` process is already live and additional calls can join in or next call should terminate it | ||
@@ -76,0 +88,0 @@ ### Basic stream usage |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28275
465
270