exiftool-vendored 15.11.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -1
- package/README.md +55 -59
- package/dist/ExifDateTime.d.ts +5 -2
- package/dist/ExifDateTime.js +49 -18
- package/dist/ExifDateTime.js.map +1 -1
- package/dist/ExifTool.d.ts +10 -9
- package/dist/ExifTool.js +7 -1
- package/dist/ExifTool.js.map +1 -1
- package/dist/ExifToolTask.js +5 -1
- package/dist/ExifToolTask.js.map +1 -1
- package/dist/JSON.js.map +1 -1
- package/dist/Object.d.ts +2 -0
- package/dist/Object.js +19 -1
- package/dist/Object.js.map +1 -1
- package/dist/ReadRawTask.js +5 -1
- package/dist/ReadRawTask.js.map +1 -1
- package/dist/ReadTask.d.ts +1 -0
- package/dist/ReadTask.js +43 -18
- package/dist/ReadTask.js.map +1 -1
- package/dist/RewriteAllTagsTask.js +5 -1
- package/dist/RewriteAllTagsTask.js.map +1 -1
- package/dist/Tags.d.ts +728 -697
- package/dist/Timezones.d.ts +2 -1
- package/dist/Timezones.js +35 -24
- package/dist/Timezones.js.map +1 -1
- package/dist/WriteTask.js +5 -1
- package/dist/WriteTask.js.map +1 -1
- package/package.json +24 -13
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Providing the flexibility to reversion the API or UPDATE version slots as
|
|
6
6
|
features or bugfixes arise and using ExifTool's version number is at odds with
|
|
7
|
-
|
|
7
|
+
each other, so this library follows [Semver](https://semver.org/), and the
|
|
8
8
|
vendored versions of ExifTool match the version they vendor.
|
|
9
9
|
|
|
10
10
|
### The `MAJOR` or `API` version is incremented for
|
|
@@ -25,6 +25,84 @@ vendored versions of ExifTool match the version they vendor.
|
|
|
25
25
|
|
|
26
26
|
## Version history
|
|
27
27
|
|
|
28
|
+
### v16.0.0
|
|
29
|
+
|
|
30
|
+
- 💔/🐞 Timezone extraction has been adjusted: if there is a GPS location, we'll
|
|
31
|
+
prefer that `tzlookup` as the authoritative timezone offset. If there isn't
|
|
32
|
+
GPS lat/lon, we'll use `Timezone`, `OffsetTime`, or `TimeZoneOffset`. If those
|
|
33
|
+
are missing, we'll infer the offset from UTC offsets.
|
|
34
|
+
|
|
35
|
+
Prior builds would defer to the offset in `Timezone`, `OffsetTime`, or
|
|
36
|
+
`TimeZoneOffset`, but GPS is more reliable, and results in a proper time zone
|
|
37
|
+
(like `America/Los_Angeles`). Zone names work correctly even when times are
|
|
38
|
+
adjusted across daylight savings offset boundaries.
|
|
39
|
+
|
|
40
|
+
- 💔/🐞 Timezone application is now has been improved: if a timezone can be
|
|
41
|
+
extracted for a given file, `readTags` will now make all `ExifDateTime`
|
|
42
|
+
entries match that timezone. The timestamps should refer to the same
|
|
43
|
+
timestamp/seconds-from-common-epoch, but "local time" may be different as
|
|
44
|
+
we've adjusted the timezone accordingly.
|
|
45
|
+
|
|
46
|
+
Metadata sometimes includes a timezone offset, and sometimes it doesn't, and
|
|
47
|
+
it's all pretty inconsistent, but worse, prior versions would sometimes
|
|
48
|
+
inherit the current system timezone for an arbitrary subset of tags. This
|
|
49
|
+
version should remove the system timezone "leaking" into your metadata values.
|
|
50
|
+
|
|
51
|
+
As an example, if you took a photo with GPS information from Rome (CET,
|
|
52
|
+
UTC+1), and your computer is in California with `TZ=America/Los_Angeles`,
|
|
53
|
+
prior versions could return `CreateDate: 2022-02-02 02:02:22-07:00`. This
|
|
54
|
+
version will translate that time into `CreateDate: 2022-02-02 11:02:22+01:00`.
|
|
55
|
+
|
|
56
|
+
Note that this fix results in `readTags` rendering different `ExifDateTime`
|
|
57
|
+
values from prior versions, so I bumped the major version to highlight this
|
|
58
|
+
change.
|
|
59
|
+
|
|
60
|
+
- 💔 `Tags` is automatically generated by `mktags`, which now has a set of
|
|
61
|
+
"required" tags with type and group metadata to ensure a core set of tags
|
|
62
|
+
don't disappear or change types.
|
|
63
|
+
|
|
64
|
+
As a reminder, the `Tags` interface is only a subset of fields returned, due
|
|
65
|
+
to TypeScript limitations. `readTags` still returns all values that ExifTool
|
|
66
|
+
provides.
|
|
67
|
+
|
|
68
|
+
- 🐞 Fixed a bunch of broken API links in the README due to `typedoc` changing
|
|
69
|
+
URLs. Harumph.
|
|
70
|
+
|
|
71
|
+
- 🐞 Prior versions of `ExifDateTime.parseISO` would accept just time or date
|
|
72
|
+
strings.
|
|
73
|
+
|
|
74
|
+
- 🐞/📦 `TimeStamp` tags may now be properly parsed as `ExifDateTime`.
|
|
75
|
+
|
|
76
|
+
- 📦 Added performance section to the README.
|
|
77
|
+
|
|
78
|
+
- 📦 Timezone offset formatting changed slightly: the hour offset is no longer
|
|
79
|
+
zero-padded, which better matches the Luxon implementation we use internally.
|
|
80
|
+
|
|
81
|
+
- 📦 `ExifDateTime` caches the result of `toDateTime` now, which may save a
|
|
82
|
+
couple extra objects fed to the GC.
|
|
83
|
+
|
|
84
|
+
- 📦 Updated dependencies, including batch-cluster
|
|
85
|
+
[v10.3.2](https://github.com/photostructure/batch-cluster.js/blob/main/CHANGELOG.md#v1032)),
|
|
86
|
+
which fixed several race conditions and added several process performance
|
|
87
|
+
improvements including support for zero-wait multi-process launches.
|
|
88
|
+
|
|
89
|
+
### v15.12.1
|
|
90
|
+
|
|
91
|
+
- 📦 Updated dependencies (batch-cluster
|
|
92
|
+
[v10.3.0](https://github.com/photostructure/batch-cluster.js/blob/main/CHANGELOG.md#v1030)),
|
|
93
|
+
including more pessimistic defaults for `streamFlushMillis` and new
|
|
94
|
+
`noTaskData` event.
|
|
95
|
+
|
|
96
|
+
- 📦 Exported type signatures, `AdditionalWriteTags`, `ExpandedDateTags`,
|
|
97
|
+
`Maybe`, `Omit`, and `Struct` to improve `typedoc`-generated documentation.
|
|
98
|
+
Rebuilt docs.
|
|
99
|
+
|
|
100
|
+
### v15.12.0
|
|
101
|
+
|
|
102
|
+
- 📦 We now verify external `exiftool`s are healthy with a `-ver` ping every 30 seconds.
|
|
103
|
+
|
|
104
|
+
- 📦 Updated dependencies (batch-cluster [v10.2.0](https://github.com/photostructure/batch-cluster.js/blob/main/CHANGELOG.md#v1020)) that includes this [performance improvement/bugfix](https://github.com/photostructure/batch-cluster.js/issues/15)
|
|
105
|
+
|
|
28
106
|
### v15.11.0
|
|
29
107
|
|
|
30
108
|
- 🌱 ExifTool upgraded to [v12.40](https://exiftool.org/history.html#v12.40).
|
package/README.md
CHANGED
|
@@ -21,19 +21,16 @@
|
|
|
21
21
|
|
|
22
22
|
1. Support for
|
|
23
23
|
|
|
24
|
-
- [reading tags](https://photostructure.github.io/exiftool-vendored.js/classes/
|
|
25
|
-
- extracting embedded binaries, like [thumbnail](https://photostructure.github.io/exiftool-vendored.js/classes/
|
|
26
|
-
- [writing tags](https://photostructure.github.io/exiftool-vendored.js/classes/
|
|
27
|
-
- [rescuing metadata](https://photostructure.github.io/exiftool-vendored.js/classes/
|
|
24
|
+
- [reading tags](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#read)
|
|
25
|
+
- extracting embedded binaries, like [thumbnail](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#extractThumbnail) and [preview](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#extractPreview) images
|
|
26
|
+
- [writing tags](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#write)
|
|
27
|
+
- [rescuing metadata](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#rewriteAllTags)
|
|
28
28
|
|
|
29
29
|
1. **[Robust type definitions](#tags)** of the top 99.5% tags used by over 6,000
|
|
30
|
-
different camera makes and models (see an [example](interfaces/
|
|
31
|
-
|
|
32
|
-
1. **Auditable ExifTool source code** (the vendored code is
|
|
33
|
-
[checksum verified](http://owl.phy.queensu.ca/~phil/exiftool/checksums.txt))
|
|
30
|
+
different camera makes and models (see an [example](https://photostructure.github.io/exiftool-vendored.js/interfaces/EXIFTags.html))
|
|
34
31
|
|
|
35
32
|
1. **Automated updates** to ExifTool ([as new versions come out
|
|
36
|
-
monthly](
|
|
33
|
+
monthly](https://exiftool.org/history.html))
|
|
37
34
|
|
|
38
35
|
1. **Robust test coverage**, performed with on [macOS, Linux, and
|
|
39
36
|
Windows](https://github.com/photostructure/exiftool-vendored.js/actions?query=workflow%3A%22Node.js+CI%22)
|
|
@@ -59,7 +56,7 @@ If you're installing on a minimal Linux distribution, like
|
|
|
59
56
|
## Upgrading
|
|
60
57
|
|
|
61
58
|
See the
|
|
62
|
-
[CHANGELOG](https://github.com/
|
|
59
|
+
[CHANGELOG](https://github.com/photostructure/exiftool-vendored.js/blob/main/CHANGELOG.md)
|
|
63
60
|
for breaking changes since you last updated.
|
|
64
61
|
|
|
65
62
|
### Major version bumps
|
|
@@ -96,7 +93,7 @@ exiftool
|
|
|
96
93
|
```
|
|
97
94
|
|
|
98
95
|
If the default [ExifTool constructor
|
|
99
|
-
parameters](https://photostructure.github.io/exiftool-vendored.js/interfaces/
|
|
96
|
+
parameters](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html)
|
|
100
97
|
wont' work for you, it's just a class that takes an options hash:
|
|
101
98
|
|
|
102
99
|
```js
|
|
@@ -110,7 +107,7 @@ Remember to `.end()` whichever singleton you use.
|
|
|
110
107
|
|
|
111
108
|
### General API
|
|
112
109
|
|
|
113
|
-
`ExifTool.read()` returns a Promise to a [Tags](https://photostructure.github.io/exiftool-vendored.js/interfaces/
|
|
110
|
+
`ExifTool.read()` returns a Promise to a [Tags](https://photostructure.github.io/exiftool-vendored.js/interfaces/Tags.html) instance. Note
|
|
114
111
|
that errors may be returned either by rejecting the promise, or for less
|
|
115
112
|
severe problems, via the `errors` field.
|
|
116
113
|
|
|
@@ -123,9 +120,9 @@ ExifTool knows how to extract _several thousand_ different tag fields.
|
|
|
123
120
|
|
|
124
121
|
Unfortunately, TypeScript crashes with `error TS2590: Expression produces a union type that is too complex to represent` if the `Tags` interface was comprehensive.
|
|
125
122
|
|
|
126
|
-
Instead, we build a corpus of "commonly seen" tags from over
|
|
123
|
+
Instead, we build a corpus of "commonly seen" tags from over 10,000 different
|
|
127
124
|
digital camera makes and models, many from the [ExifTool metadata
|
|
128
|
-
repository](https://exiftool.org/sample_images.html).
|
|
125
|
+
repository](https://exiftool.org/sample_images.html) and <raw.pixls.us>.
|
|
129
126
|
|
|
130
127
|
Here are some example fields:
|
|
131
128
|
|
|
@@ -156,7 +153,7 @@ Nikon, Canon, Sony, and Apple devices).
|
|
|
156
153
|
Just because a field is missing from the Tags interface **does not mean the
|
|
157
154
|
field doesn't exist in the returned object**. This library doesn't exclude
|
|
158
155
|
unknown fields, in other words. It's up to you and your code to look for other
|
|
159
|
-
fields you expect
|
|
156
|
+
fields you expect and cast to a more relevant interface.
|
|
160
157
|
|
|
161
158
|
### Errors and Warnings
|
|
162
159
|
|
|
@@ -170,19 +167,14 @@ warnings that don't reject the underlying task, you can provide either a
|
|
|
170
167
|
[`minorErrorsRegExp`](interfaces/exiftooloptions.html#minorerrorsregexp), or an
|
|
171
168
|
implementation of
|
|
172
169
|
[`rejectTaskOnStderr`](interfaces/exiftooloptions.html#rejecttaskonstderr).
|
|
173
|
-
Either of these parameters
|
|
170
|
+
Either of these parameters is provided to the `ExifTool` constructor.
|
|
174
171
|
|
|
175
172
|
### Logging and events
|
|
176
173
|
|
|
177
174
|
To enable trace, debug, info, warning, or error logging from this library and
|
|
178
|
-
the underlying `batch-cluster` library,
|
|
179
|
-
use[`setLogger`](globals.html#setlogger). Example
|
|
180
|
-
code can be found
|
|
181
|
-
[here](https://github.com/photostructure/batch-cluster.js/blob/main/src/_chai.spec.ts#L20).
|
|
175
|
+
the underlying `batch-cluster` library, provide a [Logger](https://photostructure.github.io/batch-cluster.js/interfaces/Logger.html) instance to the `ExifTool` constructor options.
|
|
182
176
|
|
|
183
|
-
ExifTool instances emits
|
|
184
|
-
"beforeEnd", and "end" that you can register listeners for, using
|
|
185
|
-
[on](https://batch-cluster.js.org/classes/batchcluster.html#on).
|
|
177
|
+
ExifTool instances emits [many lifecycle and error events](https://photostructure.github.io/batch-cluster.js/interfaces/BatchClusterEvents.html#beforeEnd) via `batch-cluster`.
|
|
186
178
|
|
|
187
179
|
### Reading tags
|
|
188
180
|
|
|
@@ -229,14 +221,14 @@ exiftool.extractBinaryTag("tagname", "path/to/file.exf", "path/to/dest.bin")
|
|
|
229
221
|
|
|
230
222
|
### Writing tags
|
|
231
223
|
|
|
232
|
-
Note that only a portion of tags
|
|
233
|
-
documentation](https://
|
|
224
|
+
Note that only a portion of tags is writable. Refer to [the
|
|
225
|
+
documentation](https://exiftool.org/TagNames/index.html)
|
|
234
226
|
and look under the "Writable" column.
|
|
235
227
|
|
|
236
228
|
If you apply malformed values or ask to write to tags that aren't
|
|
237
229
|
supported, the returned `Promise` will be rejected.
|
|
238
230
|
|
|
239
|
-
Only string and numeric
|
|
231
|
+
Only string and numeric primitives are supported as values to the object.
|
|
240
232
|
|
|
241
233
|
To write a comment to the given file so it shows up in the Windows Explorer
|
|
242
234
|
Properties panel:
|
|
@@ -246,7 +238,7 @@ exiftool.write("path/to/file.jpg", { XPComment: "this is a test comment" })
|
|
|
246
238
|
```
|
|
247
239
|
|
|
248
240
|
To change the DateTimeOriginal, CreateDate and ModifyDate tags (using the
|
|
249
|
-
[AllDates](https://
|
|
241
|
+
[AllDates](https://exiftool.org/TagNames/Shortcuts.html)
|
|
250
242
|
shortcut) to 4:56pm UTC on February 6, 2016:
|
|
251
243
|
|
|
252
244
|
```js
|
|
@@ -268,7 +260,7 @@ To delete a tag, use `null` as the value.
|
|
|
268
260
|
exiftool.write("path/to/file.jpg", { UserComment: null })
|
|
269
261
|
```
|
|
270
262
|
|
|
271
|
-
The above example removes any value associated
|
|
263
|
+
The above example removes any value associated with the `UserComment` tag.
|
|
272
264
|
|
|
273
265
|
### Always Beware: Timezones
|
|
274
266
|
|
|
@@ -282,11 +274,11 @@ section about [Dates](#dates) below for more information.
|
|
|
282
274
|
|
|
283
275
|
### Rewriting tags
|
|
284
276
|
|
|
285
|
-
You may find that some of your images have corrupt metadata
|
|
277
|
+
You may find that some of your images have corrupt metadata and that writing
|
|
286
278
|
new dates, or editing the rotation information, for example, fails. ExifTool can
|
|
287
279
|
try to repair these images by rewriting all the metadata into a new file, along
|
|
288
280
|
with the original image content. See the
|
|
289
|
-
[documentation](
|
|
281
|
+
[documentation](https://exiftool.org/faq.html#Q20) for more
|
|
290
282
|
details about this functionality.
|
|
291
283
|
|
|
292
284
|
`rewriteAllTags` returns a void Promise that will be rejected if there are any
|
|
@@ -301,10 +293,10 @@ exiftool.rewriteAllTags("problematic.jpg", "rewritten.jpg")
|
|
|
301
293
|
ExifTool has an [extensive user configuration system](http://owl.phy.queensu.ca/~phil/exiftool/config.html). There are several ways to use one:
|
|
302
294
|
|
|
303
295
|
1. Place your [user configuration
|
|
304
|
-
file](
|
|
296
|
+
file](https://exiftool.org/config.html) in your `HOME`
|
|
305
297
|
directory
|
|
306
298
|
1. Set the `EXIFTOOL_HOME` environment variable to the fully-qualified path that
|
|
307
|
-
contains your user
|
|
299
|
+
contains your user configuration.
|
|
308
300
|
1. Specify the in the ExifTool constructor options:
|
|
309
301
|
|
|
310
302
|
```js
|
|
@@ -316,7 +308,7 @@ new ExifTool({ exiftoolEnv: { EXIFTOOL_HOME: resolve("path", "to", "config", "di
|
|
|
316
308
|
The default `BatchClusterOptions.cleanupChildProcs` value of `true` means that BatchCluster, which is used to manage child `exiftool` processes, will try to use `ps` to ensure Node's view of process state are correct, and that errant
|
|
317
309
|
processes are cleaned up.
|
|
318
310
|
|
|
319
|
-
If you run this in a docker image based
|
|
311
|
+
If you run this in a docker image based on Alpine or Debian Slim, **this won't work properly unless you install the `procps` package.**
|
|
320
312
|
|
|
321
313
|
[See `batch-cluster` for details.](https://github.com/photostructure/batch-cluster.js/issues/13)
|
|
322
314
|
|
|
@@ -329,7 +321,7 @@ exiting due to the way Node.js streams
|
|
|
329
321
|
work](https://github.com/photostructure/exiftool-vendored.js/issues/106).
|
|
330
322
|
|
|
331
323
|
You must explicitly call `.end()` on any used instance of `ExifTool` for `node`
|
|
332
|
-
to exit gracefully.
|
|
324
|
+
to exit gracefully.
|
|
333
325
|
|
|
334
326
|
This call cannot be in a `process.on("exit")` hook, as the `stdio` streams
|
|
335
327
|
attached to the child process cannot be `unref`'ed. (If there's a solution to
|
|
@@ -356,9 +348,9 @@ Images and videos rarely specify a time zone in their dates. If all your files
|
|
|
356
348
|
were captured in your current time zone, defaulting to the local time zone is a
|
|
357
349
|
safe assumption, but if you have files that were captured in different parts of
|
|
358
350
|
the world, **this assumption will not be correct**. Parsing the same file in
|
|
359
|
-
different parts of the world
|
|
351
|
+
different parts of the world result in different times for the same file.
|
|
360
352
|
|
|
361
|
-
Prior to version 7, heuristic 1 and 3
|
|
353
|
+
Prior to version 7, heuristic 1 and 3 were applied.
|
|
362
354
|
|
|
363
355
|
As of version 7.0.0, `exiftool-vendored` uses the following heuristics. The
|
|
364
356
|
highest-priority heuristic to return a value will be used as the timezone offset
|
|
@@ -366,7 +358,7 @@ for all datetime tags that don't already have a specified timezone.
|
|
|
366
358
|
|
|
367
359
|
### Heuristic 1: explicit metadata
|
|
368
360
|
|
|
369
|
-
If the [EXIF](https://
|
|
361
|
+
If the [EXIF](https://exiftool.org/TagNames/EXIF.html)
|
|
370
362
|
`TimeZoneOffset` tag is present it will be applied as per the spec to
|
|
371
363
|
`DateTimeOriginal`, and if there are two values, the `ModifyDate` tag as well.
|
|
372
364
|
`OffsetTime`, `OffsetTimeOriginal`, and `OffsetTimeDigitized` are also
|
|
@@ -386,14 +378,14 @@ Deltas of > 14 hours are considered invalid.
|
|
|
386
378
|
|
|
387
379
|
### ExifDate and ExifDateTime
|
|
388
380
|
|
|
389
|
-
Because
|
|
381
|
+
Because date-times have this optionally-set timezone, and some tags only specify
|
|
390
382
|
the date, this library returns classes that encode the date, the time of day, or
|
|
391
383
|
both, **with an optional timezone and an optional tzoffset**: `ExifDateTime` and
|
|
392
384
|
`ExifTime`. It's up to you, then, to determine what's correct for your
|
|
393
385
|
situation.
|
|
394
386
|
|
|
395
387
|
Note also that some smartphones record timestamps with microsecond precision
|
|
396
|
-
(not just
|
|
388
|
+
(not just milliseconds!), and both `ExifDateTime` and `ExifTime` have floating point
|
|
397
389
|
milliseconds.
|
|
398
390
|
|
|
399
391
|
## Tags
|
|
@@ -410,12 +402,12 @@ camera make and model images, in large part sourced from the ExifTool site.
|
|
|
410
402
|
that your IDE can autocomplete.
|
|
411
403
|
|
|
412
404
|
Tags marked with "★★★★", like
|
|
413
|
-
[MIMEType](https://photostructure.github.io/exiftool-vendored.js/interfaces/
|
|
405
|
+
[MIMEType](https://photostructure.github.io/exiftool-vendored.js/interfaces/FileTags.html#MIMEType),
|
|
414
406
|
should be found in most files. Of the several thousand metadata tags, realize
|
|
415
|
-
less than 50 are found generally. You'll need to do your
|
|
407
|
+
less than 50 are found generally. You'll need to do your research to
|
|
416
408
|
determine which tags are valid for your uses.
|
|
417
409
|
|
|
418
|
-
Note that if parsing fails (for, example, a
|
|
410
|
+
Note that if parsing fails (for, example, a date-time string), the raw string
|
|
419
411
|
will be returned. Consuming code should verify both existence and type as
|
|
420
412
|
reasonable for safety.
|
|
421
413
|
|
|
@@ -439,28 +431,32 @@ const tags2: Tags = parseJSON(str) as Tags
|
|
|
439
431
|
|
|
440
432
|
## Performance
|
|
441
433
|
|
|
442
|
-
The
|
|
443
|
-
|
|
434
|
+
The default [exiftool]() singleton is intentionally throttled. If full system
|
|
435
|
+
utilization is acceptable:
|
|
444
436
|
|
|
445
|
-
|
|
437
|
+
1. set
|
|
438
|
+
[`maxProcs`](https://photostructure.github.io/batch-cluster.js/classes/BatchClusterOptions.html#maxProcs)
|
|
439
|
+
higher
|
|
446
440
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
Parsing took 27s (9.0ms / file) # ubuntu 18.04, core i3, maxProcs 1
|
|
451
|
-
Parsing took 13s (4.2ms / file) # ubuntu 18.04, core i3, maxProcs 4
|
|
441
|
+
2. consider setting
|
|
442
|
+
[`minDelayBetweenSpawnMillis`](https://photostructure.github.io/batch-cluster.js/classes/BatchClusterOptions.html#minDelayBetweenSpawnMillis)
|
|
443
|
+
to 0
|
|
452
444
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
445
|
+
3. On a performant linux box, a smaller value of `streamFlushMillis` may work as
|
|
446
|
+
well: if you see [`noTaskData`
|
|
447
|
+
events](https://photostructure.github.io/batch-cluster.js/interfaces/BatchClusterEvents.html#noTaskData),
|
|
448
|
+
you need to bump the value up.
|
|
457
449
|
|
|
458
|
-
|
|
450
|
+
## Benchmarking
|
|
459
451
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
452
|
+
The `yarn mktags ../path/to/examples` target reads all tags found in a directory
|
|
453
|
+
hierarchy of sample images and videos, and parses the results.
|
|
454
|
+
|
|
455
|
+
`exiftool-vendored` v16.0.0 on a 2019 AMD Ryzen 3900X running Ubuntu 20.04 on an
|
|
456
|
+
SSD can process 20+ files per second, per thread, or 500+ files per second
|
|
457
|
+
utilizing all CPU threads.
|
|
458
|
+
|
|
459
|
+
It can read, parse,
|
|
464
460
|
|
|
465
461
|
### Batch mode
|
|
466
462
|
|
package/dist/ExifDateTime.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { DateTime, ToISOTimeOptions } from "luxon";
|
|
1
|
+
import { DateTime, ToISOTimeOptions, Zone, ZoneOptions } from "luxon";
|
|
2
2
|
import { Maybe } from "./Maybe";
|
|
3
3
|
/**
|
|
4
4
|
* Encodes an ExifDateTime with an optional tz offset in minutes.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ExifDateTime {
|
|
7
|
+
#private;
|
|
7
8
|
readonly year: number;
|
|
8
9
|
readonly month: number;
|
|
9
10
|
readonly day: number;
|
|
@@ -14,7 +15,7 @@ export declare class ExifDateTime {
|
|
|
14
15
|
readonly tzoffsetMinutes?: number | undefined;
|
|
15
16
|
readonly rawValue?: string | undefined;
|
|
16
17
|
readonly zoneName?: string | undefined;
|
|
17
|
-
static fromISO(iso: string, zone?: Maybe<string
|
|
18
|
+
static fromISO(iso: string, zone?: Maybe<string>): Maybe<ExifDateTime>;
|
|
18
19
|
/**
|
|
19
20
|
* Try to parse a date-time string from EXIF. If there is not both a date and
|
|
20
21
|
* a time component, returns `undefined`.
|
|
@@ -33,7 +34,9 @@ export declare class ExifDateTime {
|
|
|
33
34
|
get millis(): number | undefined;
|
|
34
35
|
get hasZone(): boolean;
|
|
35
36
|
get zone(): Maybe<string>;
|
|
37
|
+
setZone(zone?: string | Zone, opts?: ZoneOptions): ExifDateTime;
|
|
36
38
|
toDateTime(): DateTime;
|
|
39
|
+
toEpochSeconds(): number;
|
|
37
40
|
toDate(): Date;
|
|
38
41
|
toISOString(options?: ToISOTimeOptions): Maybe<string>;
|
|
39
42
|
toExifString(): string;
|
package/dist/ExifDateTime.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var _ExifDateTime_dt;
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
exports.ExifDateTime = void 0;
|
|
4
16
|
const luxon_1 = require("luxon");
|
|
@@ -21,14 +33,24 @@ class ExifDateTime {
|
|
|
21
33
|
this.tzoffsetMinutes = tzoffsetMinutes;
|
|
22
34
|
this.rawValue = rawValue;
|
|
23
35
|
this.zoneName = zoneName;
|
|
36
|
+
_ExifDateTime_dt.set(this, void 0);
|
|
24
37
|
}
|
|
25
|
-
static fromISO(iso, zone
|
|
38
|
+
static fromISO(iso, zone) {
|
|
26
39
|
if ((0, String_1.blank)(iso) || null != iso.match(/^\d+$/))
|
|
27
40
|
return undefined;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
// Unfortunately, DateTime.fromISO() is happy to parse a date with no time,
|
|
42
|
+
// so we have to do this ourselves:
|
|
43
|
+
return this.fromPatterns(iso, [
|
|
44
|
+
// if it specifies a zone, use it:
|
|
45
|
+
{ fmt: "y-M-d'T'H:m:s.uZZ" },
|
|
46
|
+
{ fmt: "y-M-d'T'H:m:sZZ" },
|
|
47
|
+
// if it specifies UTC, use it:
|
|
48
|
+
{ fmt: "y-M-d'T'H:m:s.u'Z'", zone: "utc" },
|
|
49
|
+
{ fmt: "y-M-d'T'H:m:s'Z'", zone: "utc" },
|
|
50
|
+
// Otherwise use the default zone:
|
|
51
|
+
{ fmt: "y-M-d'T'H:m:s.u", zone },
|
|
52
|
+
{ fmt: "y-M-d'T'H:m:s", zone },
|
|
53
|
+
]);
|
|
32
54
|
}
|
|
33
55
|
/**
|
|
34
56
|
* Try to parse a date-time string from EXIF. If there is not both a date and
|
|
@@ -67,9 +89,10 @@ class ExifDateTime {
|
|
|
67
89
|
}), (dt) => this.fromDateTime(dt, s))));
|
|
68
90
|
}
|
|
69
91
|
static fromExifStrict(text, zone) {
|
|
92
|
+
var _a;
|
|
70
93
|
if ((0, String_1.blank)(text))
|
|
71
94
|
return undefined;
|
|
72
|
-
return this.fromPatterns(text, [
|
|
95
|
+
return ((_a = this.fromPatterns(text, [
|
|
73
96
|
// if it specifies a zone, use it:
|
|
74
97
|
{ fmt: "y:M:d H:m:s.uZZ" },
|
|
75
98
|
{ fmt: "y:M:d H:m:sZZ" },
|
|
@@ -80,16 +103,7 @@ class ExifDateTime {
|
|
|
80
103
|
{ fmt: "y:M:d H:m:s.u", zone },
|
|
81
104
|
{ fmt: "y:M:d H:m:s", zone },
|
|
82
105
|
// Not found yet? Maybe it's in ISO format? See https://github.com/photostructure/exiftool-vendored.js/issues/71
|
|
83
|
-
|
|
84
|
-
{ fmt: "y-M-d'T'H:m:s.uZZ" },
|
|
85
|
-
{ fmt: "y-M-d'T'H:m:sZZ" },
|
|
86
|
-
// if it specifies UTC, use it:
|
|
87
|
-
{ fmt: "y-M-d'T'H:m:s.u'Z'", zone: "utc" },
|
|
88
|
-
{ fmt: "y-M-d'T'H:m:s'Z'", zone: "utc" },
|
|
89
|
-
// Otherwise use the default zone:
|
|
90
|
-
{ fmt: "y-M-d'T'H:m:s.u", zone },
|
|
91
|
-
{ fmt: "y-M-d'T'H:m:s", zone },
|
|
92
|
-
]);
|
|
106
|
+
])) !== null && _a !== void 0 ? _a : this.fromISO(text, zone));
|
|
93
107
|
}
|
|
94
108
|
static fromExifLoose(text, defaultZone) {
|
|
95
109
|
if ((0, String_1.blank)(text))
|
|
@@ -127,8 +141,21 @@ class ExifDateTime {
|
|
|
127
141
|
var _a;
|
|
128
142
|
return (_a = this.zoneName) !== null && _a !== void 0 ? _a : (0, Timezones_1.offsetMinutesToZoneName)(this.tzoffsetMinutes);
|
|
129
143
|
}
|
|
144
|
+
setZone(zone, opts) {
|
|
145
|
+
// This is a bit tricky... We want to keep the local time and just _say_ it was in the zone of the image **if we don't already have a zone.**
|
|
146
|
+
// If we _do_ have a zone, assume it was already converted by ExifTool into (probably the system) timezone, which means _don't_ keepLocalTime.
|
|
147
|
+
const result = ExifDateTime.fromDateTime(this.toDateTime().setZone(zone, {
|
|
148
|
+
keepLocalTime: !this.hasZone,
|
|
149
|
+
...opts,
|
|
150
|
+
}), this.rawValue);
|
|
151
|
+
// We know this will be defined: this is valid, so changing the zone will
|
|
152
|
+
// also be valid.
|
|
153
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
154
|
+
return result;
|
|
155
|
+
}
|
|
130
156
|
toDateTime() {
|
|
131
|
-
|
|
157
|
+
var _a;
|
|
158
|
+
return (__classPrivateFieldSet(this, _ExifDateTime_dt, (_a = __classPrivateFieldGet(this, _ExifDateTime_dt, "f")) !== null && _a !== void 0 ? _a : luxon_1.DateTime.fromObject({
|
|
132
159
|
year: this.year,
|
|
133
160
|
month: this.month,
|
|
134
161
|
day: this.day,
|
|
@@ -138,7 +165,10 @@ class ExifDateTime {
|
|
|
138
165
|
millisecond: this.millisecond,
|
|
139
166
|
}, {
|
|
140
167
|
zone: this.zone,
|
|
141
|
-
});
|
|
168
|
+
}), "f"));
|
|
169
|
+
}
|
|
170
|
+
toEpochSeconds() {
|
|
171
|
+
return this.toDateTime().toUnixInteger();
|
|
142
172
|
}
|
|
143
173
|
toDate() {
|
|
144
174
|
return this.toDateTime().toJSDate();
|
|
@@ -179,4 +209,5 @@ class ExifDateTime {
|
|
|
179
209
|
}
|
|
180
210
|
}
|
|
181
211
|
exports.ExifDateTime = ExifDateTime;
|
|
212
|
+
_ExifDateTime_dt = new WeakMap();
|
|
182
213
|
//# sourceMappingURL=ExifDateTime.js.map
|
package/dist/ExifDateTime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifDateTime.js","sourceRoot":"","sources":["../src/ExifDateTime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExifDateTime.js","sourceRoot":"","sources":["../src/ExifDateTime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAqE;AACrE,yCAA2C;AAC3C,m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AAU,EAAE,CAAC,OAAO,CAAA;IAClC,CAAC;IAED,MAAM;QACJ,OAAO;YACL,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAwC;QACtD,OAAO,IAAI,YAAY,CACrB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,QAAQ,CACd,CAAA;IACH,CAAC;CACF;AArQD,oCAqQC"}
|
package/dist/ExifTool.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as bc from "batch-cluster";
|
|
3
|
+
import { ApplicationRecordTags } from "./ApplicationRecordTags";
|
|
3
4
|
import { ExifDate } from "./ExifDate";
|
|
4
5
|
import { ExifDateTime } from "./ExifDateTime";
|
|
5
6
|
import { ExifToolTask } from "./ExifToolTask";
|
|
7
|
+
import { ICCProfileTags } from "./ICCProfileTags";
|
|
8
|
+
import { Maybe } from "./Maybe";
|
|
6
9
|
import { PreviewTag } from "./PreviewTag";
|
|
7
|
-
import {
|
|
10
|
+
import { Struct } from "./Struct";
|
|
11
|
+
import { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, IPTCTags, JFIFTags, MakerNotesTags, MetaTags, MPFTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Tags, XMPTags } from "./Tags";
|
|
8
12
|
export { ExifDate } from "./ExifDate";
|
|
9
13
|
export { ExifDateTime } from "./ExifDateTime";
|
|
10
14
|
export { ExifTime } from "./ExifTime";
|
|
11
15
|
export { ExifToolTask } from "./ExifToolTask";
|
|
12
16
|
export { parseJSON } from "./JSON";
|
|
13
17
|
export { offsetMinutesToZoneName, UnsetZone, UnsetZoneName, UnsetZoneOffsetMinutes, } from "./Timezones";
|
|
14
|
-
export type { Tags };
|
|
18
|
+
export type { AdditionalWriteTags, APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, EXIFTags, ExifToolTags, ExpandedDateTags, FileTags, FlashPixTags, ICCProfileTags, IPTCTags, JFIFTags, MakerNotesTags, Maybe, MetaTags, MPFTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Struct, Tags, XMPTags, };
|
|
15
19
|
export declare const DefaultExifToolPath: string;
|
|
16
20
|
export declare const DefaultExiftoolArgs: string[];
|
|
17
21
|
/**
|
|
@@ -28,17 +32,13 @@ export interface ShortcutTags {
|
|
|
28
32
|
}
|
|
29
33
|
declare type AdditionalWriteTags = {
|
|
30
34
|
"Orientation#"?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Included because it's so rare, it doesn't always make the Tags build:
|
|
33
|
-
*/
|
|
34
|
-
TimeZoneOffset?: number | string;
|
|
35
35
|
};
|
|
36
36
|
declare type ExpandedDateTags = {
|
|
37
37
|
[K in keyof Tags]: (Tags[K] extends number ? number : Tags[K] extends ExifDateTime ? ExifDate | ExifDateTime : Tags[K]) | string;
|
|
38
38
|
};
|
|
39
|
-
declare type
|
|
39
|
+
export declare type Defined<T> = T extends undefined ? never : T;
|
|
40
40
|
export declare type DefinedOrNullValued<T> = {
|
|
41
|
-
[P in keyof T]:
|
|
41
|
+
[P in keyof T]: Defined<T[P]> | null;
|
|
42
42
|
};
|
|
43
43
|
export declare type WriteTags = DefinedOrNullValued<ShortcutTags & AdditionalWriteTags & ExpandedDateTags>;
|
|
44
44
|
export declare const DefaultMaxProcs: number;
|
|
@@ -320,11 +320,12 @@ export declare class ExifTool {
|
|
|
320
320
|
* @return report why child processes were recycled
|
|
321
321
|
*/
|
|
322
322
|
childEndCounts(): {
|
|
323
|
-
|
|
323
|
+
startError: number;
|
|
324
324
|
broken: number;
|
|
325
325
|
closed: number;
|
|
326
326
|
ending: number;
|
|
327
327
|
ended: number;
|
|
328
|
+
idle: number;
|
|
328
329
|
old: number;
|
|
329
330
|
"proc.close": number;
|
|
330
331
|
"proc.disconnect": number;
|
package/dist/ExifTool.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -100,6 +104,8 @@ exports.DefaultExifToolOptions = Object.freeze({
|
|
|
100
104
|
fail: "{ready}",
|
|
101
105
|
exitCommand: "-stay_open\nFalse\n",
|
|
102
106
|
versionCommand: new VersionTask_1.VersionTask().command,
|
|
107
|
+
healthCheckIntervalMillis: 30000,
|
|
108
|
+
healthCheckCommand: "-ver\n-execute\n",
|
|
103
109
|
numericTags: [
|
|
104
110
|
"*Duration*",
|
|
105
111
|
"GPSAltitude",
|