exiftool-vendored 21.3.0 → 21.5.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 +19 -1
- package/dist/DefaultExifToolOptions.d.ts +7 -0
- package/dist/DefaultExifToolOptions.js +70 -0
- package/dist/DefaultExifToolOptions.js.map +1 -0
- package/dist/DefaultExiftoolArgs.d.ts +1 -0
- package/dist/DefaultExiftoolArgs.js +5 -0
- package/dist/DefaultExiftoolArgs.js.map +1 -0
- package/dist/DefaultMaxProcs.d.ts +1 -0
- package/dist/DefaultMaxProcs.js +29 -0
- package/dist/DefaultMaxProcs.js.map +1 -0
- package/dist/ExifTool.d.ts +36 -32
- package/dist/ExifTool.js +39 -93
- package/dist/ExifTool.js.map +1 -1
- package/dist/ExifToolOptions.d.ts +31 -5
- package/dist/FindExiftool.d.ts +1 -0
- package/dist/FindExiftool.js +54 -0
- package/dist/FindExiftool.js.map +1 -0
- package/dist/Pick.d.ts +1 -0
- package/dist/Pick.js +16 -0
- package/dist/Pick.js.map +1 -0
- package/dist/RawTags.d.ts +10 -0
- package/dist/RawTags.js +3 -0
- package/dist/RawTags.js.map +1 -0
- package/dist/ReadRawTask.d.ts +3 -3
- package/dist/ReadRawTask.js.map +1 -1
- package/dist/ReadTask.d.ts +10 -5
- package/dist/ReadTask.js +20 -9
- package/dist/ReadTask.js.map +1 -1
- package/dist/Tags.d.ts +15 -15
- package/dist/WriteTags.d.ts +2 -0
- package/dist/WriteTags.js +3 -0
- package/dist/WriteTags.js.map +1 -0
- package/dist/WriteTask.d.ts +6 -2
- package/dist/WriteTask.js +13 -5
- package/dist/WriteTask.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -25,7 +25,25 @@ vendored versions of ExifTool match the version that they vendor.
|
|
|
25
25
|
|
|
26
26
|
## Version history
|
|
27
27
|
|
|
28
|
-
### v21.
|
|
28
|
+
### v21.5.0
|
|
29
|
+
|
|
30
|
+
- ✨ Added support for ExifTool's [MWG Composite
|
|
31
|
+
Tags](https://exiftool.org/TagNames/MWG.html). Set the new
|
|
32
|
+
[`ExifToolOptions.useMWG`](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#useMWG)
|
|
33
|
+
option to `true` to enable.
|
|
34
|
+
|
|
35
|
+
- ✨ Added support for ExifTool's new `ImageDataMD5` feature. Set the new
|
|
36
|
+
[`ExifToolOptions.includeImageDataMD5`](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#includeImageDataMD5)
|
|
37
|
+
option to `true` to enable.
|
|
38
|
+
|
|
39
|
+
- 📦 Extracted options-related code into modules to remove a couple circular
|
|
40
|
+
dependencies. Exports should make this transparent to external clients.
|
|
41
|
+
|
|
42
|
+
### v21.4.0
|
|
43
|
+
|
|
44
|
+
- 🐞 Improved types from `ExifTool.readRaw()`. Thanks for the suggestion, [Silvio Brändle](https://github.com/photostructure/exiftool-vendored.js/issues/138)!
|
|
45
|
+
|
|
46
|
+
### v21.3.0
|
|
29
47
|
|
|
30
48
|
- 🌱 ExifTool upgraded to [v12.60](https://exiftool.org/history.html#v12.60)
|
|
31
49
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExifToolOptions } from "./ExifToolOptions";
|
|
2
|
+
import { Omit } from "./Omit";
|
|
3
|
+
/**
|
|
4
|
+
* Default values for `ExifToolOptions`, except for `processFactory` (which is
|
|
5
|
+
* created by the ExifTool constructor)
|
|
6
|
+
*/
|
|
7
|
+
export declare const DefaultExifToolOptions: Omit<ExifToolOptions, "processFactory" | "ignoreShebang">;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DefaultExifToolOptions = void 0;
|
|
27
|
+
const bc = __importStar(require("batch-cluster"));
|
|
28
|
+
const DefaultExiftoolArgs_1 = require("./DefaultExiftoolArgs");
|
|
29
|
+
const DefaultMaxProcs_1 = require("./DefaultMaxProcs");
|
|
30
|
+
const FindExiftool_1 = require("./FindExiftool");
|
|
31
|
+
const GeoTz_1 = require("./GeoTz");
|
|
32
|
+
const IgnorableError_1 = require("./IgnorableError");
|
|
33
|
+
const VersionTask_1 = require("./VersionTask");
|
|
34
|
+
/**
|
|
35
|
+
* Default values for `ExifToolOptions`, except for `processFactory` (which is
|
|
36
|
+
* created by the ExifTool constructor)
|
|
37
|
+
*/
|
|
38
|
+
exports.DefaultExifToolOptions = Object.freeze({
|
|
39
|
+
...new bc.BatchClusterOptions(),
|
|
40
|
+
maxProcs: DefaultMaxProcs_1.DefaultMaxProcs,
|
|
41
|
+
maxTasksPerProcess: 500,
|
|
42
|
+
spawnTimeoutMillis: 30000,
|
|
43
|
+
// see https://github.com/photostructure/exiftool-vendored.js/issues/34 :
|
|
44
|
+
taskTimeoutMillis: 20000,
|
|
45
|
+
onIdleIntervalMillis: 2000,
|
|
46
|
+
taskRetries: 1,
|
|
47
|
+
exiftoolPath: FindExiftool_1.DefaultExifToolPath,
|
|
48
|
+
exiftoolArgs: DefaultExiftoolArgs_1.DefaultExiftoolArgs,
|
|
49
|
+
exiftoolEnv: {},
|
|
50
|
+
pass: "{ready}",
|
|
51
|
+
fail: "{ready}",
|
|
52
|
+
exitCommand: "-stay_open\nFalse\n",
|
|
53
|
+
versionCommand: new VersionTask_1.VersionTask().command,
|
|
54
|
+
healthCheckIntervalMillis: 30000,
|
|
55
|
+
healthCheckCommand: "-ver\n-execute\n",
|
|
56
|
+
useMWG: false,
|
|
57
|
+
numericTags: [
|
|
58
|
+
"*Duration*",
|
|
59
|
+
"GPSAltitude",
|
|
60
|
+
"GPSLatitude",
|
|
61
|
+
"GPSLongitude",
|
|
62
|
+
"GPSPosition",
|
|
63
|
+
"Orientation",
|
|
64
|
+
],
|
|
65
|
+
includeImageDataMD5: false,
|
|
66
|
+
defaultVideosToUTC: true,
|
|
67
|
+
geoTz: GeoTz_1.geoTz,
|
|
68
|
+
isIgnorableError: IgnorableError_1.isIgnorableWarning,
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=DefaultExifToolOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultExifToolOptions.js","sourceRoot":"","sources":["../src/DefaultExifToolOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,+DAA2D;AAC3D,uDAAmD;AAEnD,iDAAoD;AACpD,mCAA+B;AAC/B,qDAAqD;AAErD,+CAA2C;AAE3C;;;GAGG;AAEU,QAAA,sBAAsB,GAG/B,MAAM,CAAC,MAAM,CAAC;IAChB,GAAG,IAAI,EAAE,CAAC,mBAAmB,EAAE;IAC/B,QAAQ,EAAE,iCAAe;IACzB,kBAAkB,EAAE,GAAG;IACvB,kBAAkB,EAAE,KAAK;IACzB,yEAAyE;IACzE,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,IAAI;IAC1B,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,kCAAmB;IACjC,YAAY,EAAE,yCAAmB;IACjC,WAAW,EAAE,EAAE;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,IAAI,yBAAW,EAAE,CAAC,OAAO;IACzC,yBAAyB,EAAE,KAAK;IAChC,kBAAkB,EAAE,kBAAkB;IACtC,MAAM,EAAE,KAAK;IACb,WAAW,EAAE;QACX,YAAY;QACZ,aAAa;QACb,aAAa;QACb,cAAc;QACd,aAAa;QACb,aAAa;KACd;IACD,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,IAAI;IACxB,KAAK,EAAE,aAAK;IACZ,gBAAgB,EAAE,mCAAkB;CACrC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DefaultExiftoolArgs: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultExiftoolArgs.js","sourceRoot":"","sources":["../src/DefaultExiftoolArgs.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DefaultMaxProcs: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DefaultMaxProcs = void 0;
|
|
27
|
+
const _os = __importStar(require("os"));
|
|
28
|
+
exports.DefaultMaxProcs = Math.max(1, Math.floor(_os.cpus().length / 4));
|
|
29
|
+
//# sourceMappingURL=DefaultMaxProcs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultMaxProcs.js","sourceRoot":"","sources":["../src/DefaultMaxProcs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAyB;AAEZ,QAAA,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAA"}
|
package/dist/ExifTool.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as bc from "batch-cluster";
|
|
3
3
|
import { ApplicationRecordTags } from "./ApplicationRecordTags";
|
|
4
|
+
import { DefaultExiftoolArgs } from "./DefaultExiftoolArgs";
|
|
5
|
+
import { DefaultExifToolOptions } from "./DefaultExifToolOptions";
|
|
6
|
+
import { DefaultMaxProcs } from "./DefaultMaxProcs";
|
|
4
7
|
import { ExifDate } from "./ExifDate";
|
|
5
8
|
import { ExifDateTime } from "./ExifDateTime";
|
|
6
9
|
import { ExifToolOptions } from "./ExifToolOptions";
|
|
@@ -10,10 +13,14 @@ import { IgnorableError } from "./IgnorableError";
|
|
|
10
13
|
import { Maybe } from "./Maybe";
|
|
11
14
|
import { Omit } from "./Omit";
|
|
12
15
|
import { PreviewTag } from "./PreviewTag";
|
|
16
|
+
import { Json, Literal, RawTags } from "./RawTags";
|
|
17
|
+
import { DefaultReadTaskOptions, ReadTaskOptions } from "./ReadTask";
|
|
13
18
|
import { ResourceEvent } from "./ResourceEvent";
|
|
14
19
|
import { Struct } from "./Struct";
|
|
15
20
|
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";
|
|
16
21
|
import { Version } from "./Version";
|
|
22
|
+
import { WriteTags } from "./WriteTags";
|
|
23
|
+
import { DefaultWriteTaskOptions, WriteTaskOptions } from "./WriteTask";
|
|
17
24
|
export { BinaryField } from "./BinaryField";
|
|
18
25
|
export { ExifDate } from "./ExifDate";
|
|
19
26
|
export { ExifDateTime } from "./ExifDateTime";
|
|
@@ -22,9 +29,7 @@ export { ExifToolTask } from "./ExifToolTask";
|
|
|
22
29
|
export { isIgnorableWarning } from "./IgnorableError";
|
|
23
30
|
export { parseJSON } from "./JSON";
|
|
24
31
|
export { defaultVideosToUTC, offsetMinutesToZoneName, UnsetZone, UnsetZoneName, UnsetZoneOffsetMinutes, } from "./Timezones";
|
|
25
|
-
export type { AdditionalWriteTags, APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags,
|
|
26
|
-
export declare const DefaultExifToolPath: string;
|
|
27
|
-
export declare const DefaultExiftoolArgs: string[];
|
|
32
|
+
export type { AdditionalWriteTags, APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, DefaultExiftoolArgs, DefaultExifToolOptions, DefaultMaxProcs, DefaultReadTaskOptions, DefaultWriteTaskOptions, EXIFTags, ExifToolOptions, ExifToolTags, ExpandedDateTags, FileTags, FlashPixTags, ICCProfileTags, IgnorableError, IPTCTags, JFIFTags, Json, Literal, MakerNotesTags, Maybe, MetaTags, MPFTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RawTags, ReadTaskOptions, ResourceEvent, RIFFTags, Struct, Tags, Version, WriteTags, WriteTaskOptions, XMPTags, };
|
|
28
33
|
/**
|
|
29
34
|
* @see https://exiftool.org/TagNames/Shortcuts.html
|
|
30
35
|
*/
|
|
@@ -57,13 +62,6 @@ export interface StructAppendTags {
|
|
|
57
62
|
*/
|
|
58
63
|
"Versions+"?: Version | Version[];
|
|
59
64
|
}
|
|
60
|
-
export type WriteTags = DefinedOrNullValued<ShortcutTags & AdditionalWriteTags & ExpandedDateTags & StructAppendTags>;
|
|
61
|
-
export declare const DefaultMaxProcs: number;
|
|
62
|
-
/**
|
|
63
|
-
* Default values for `ExifToolOptions`, except for `processFactory` (which is
|
|
64
|
-
* created by the ExifTool constructor)
|
|
65
|
-
*/
|
|
66
|
-
export declare const DefaultExifToolOptions: Omit<ExifToolOptions, "processFactory" | "ignoreShebang">;
|
|
67
65
|
/**
|
|
68
66
|
* Manages delegating calls to a vendored running instance of ExifTool.
|
|
69
67
|
*
|
|
@@ -86,39 +84,45 @@ export declare class ExifTool {
|
|
|
86
84
|
* Read the tags in `file`.
|
|
87
85
|
*
|
|
88
86
|
* @param {string} file the file to extract metadata tags from
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
87
|
+
*
|
|
88
|
+
* @param {string[]} [optionalArgs] any additional ExifTool arguments, like
|
|
89
|
+
* "-fast" or "-fast2". **Most other arguments will require you to use
|
|
90
|
+
* `readRaw`.** Note that the default is "-fast", so if you want ExifTool to
|
|
91
|
+
* read the entire file for metadata, you should pass an empty array as the
|
|
92
|
+
* second parameter. See https://exiftool.org/#performance for more
|
|
93
|
+
* information about `-fast` and `-fast2`.
|
|
94
|
+
*
|
|
95
95
|
* @returns {Promise<Tags>} A resolved Tags promise. If there are errors
|
|
96
96
|
* during reading, the `.errors` field will be present.
|
|
97
|
-
* @memberof ExifTool
|
|
98
97
|
*/
|
|
99
|
-
read<T extends Tags = Tags>(file: string, optionalArgs?: string[]): Promise<T>;
|
|
98
|
+
read<T extends Tags = Tags>(file: string, optionalArgs?: string[], options?: ReadTaskOptions): Promise<T>;
|
|
100
99
|
/**
|
|
101
|
-
* Read the tags from `file`, without any post-processing of ExifTool
|
|
100
|
+
* Read the tags from `file`, without any post-processing of ExifTool
|
|
101
|
+
* values.
|
|
102
102
|
*
|
|
103
|
-
* **You probably want `read`, not this method. READ THE REST OF THIS
|
|
104
|
-
* CAREFULLY.**
|
|
103
|
+
* **You probably want `read`, not this method. READ THE REST OF THIS
|
|
104
|
+
* COMMENT CAREFULLY.**
|
|
105
105
|
*
|
|
106
|
-
* If you want to extract specific tag values from a file, you may want to
|
|
107
|
-
* this, but all data validation and inference heuristics provided by
|
|
108
|
-
* will be skipped.
|
|
106
|
+
* If you want to extract specific tag values from a file, you may want to
|
|
107
|
+
* use this, but all data validation and inference heuristics provided by
|
|
108
|
+
* `read` will be skipped.
|
|
109
109
|
*
|
|
110
|
-
* Note that performance will be very similar to `read`, and will actually
|
|
111
|
-
* worse if you don't include `-fast` or `-fast2` (as the most expensive
|
|
112
|
-
* is the perl interpreter and scanning the file on disk).
|
|
110
|
+
* Note that performance will be very similar to `read`, and will actually
|
|
111
|
+
* be worse if you don't include `-fast` or `-fast2` (as the most expensive
|
|
112
|
+
* bit is the perl interpreter and scanning the file on disk).
|
|
113
113
|
*
|
|
114
|
-
* @param args any additional arguments other than the file path. Note that
|
|
114
|
+
* @param args any additional arguments other than the file path. Note that
|
|
115
|
+
* "-json", and the Windows unicode filename handler flags, "-charset
|
|
116
|
+
* filename=utf8", will be added automatically.
|
|
115
117
|
*
|
|
116
118
|
* @return Note that the return value will be similar to `Tags`, but with no
|
|
117
|
-
* date, time, or other rich type parsing that you get from `.read()`. The
|
|
119
|
+
* date, time, or other rich type parsing that you get from `.read()`. The
|
|
120
|
+
* field values will be `string | number | string[]`.
|
|
118
121
|
*
|
|
119
|
-
* @see https://github.com/photostructure/exiftool-vendored.js/issues/44
|
|
122
|
+
* @see https://github.com/photostructure/exiftool-vendored.js/issues/44 for
|
|
123
|
+
* typing details.
|
|
120
124
|
*/
|
|
121
|
-
readRaw(file: string, args?: string[]): Promise<
|
|
125
|
+
readRaw(file: string, args?: string[]): Promise<RawTags>;
|
|
122
126
|
/**
|
|
123
127
|
* Write the given `tags` to `file`.
|
|
124
128
|
*
|
|
@@ -131,7 +135,7 @@ export declare class ExifTool {
|
|
|
131
135
|
* there are errors or warnings.
|
|
132
136
|
* @memberof ExifTool
|
|
133
137
|
*/
|
|
134
|
-
write(file: string, tags: WriteTags, args?: string[]): Promise<void>;
|
|
138
|
+
write(file: string, tags: WriteTags, args?: string[], options?: WriteTaskOptions): Promise<void>;
|
|
135
139
|
/**
|
|
136
140
|
* This will strip `file` of all metadata tags. The original file (with the
|
|
137
141
|
* name `${FILENAME}_original`) will be retained. Note that some tags, like
|
package/dist/ExifTool.js
CHANGED
|
@@ -26,21 +26,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.exiftool = exports.ExifTool = exports.
|
|
29
|
+
exports.exiftool = exports.ExifTool = exports.UnsetZoneOffsetMinutes = exports.UnsetZoneName = exports.UnsetZone = exports.offsetMinutesToZoneName = exports.defaultVideosToUTC = exports.parseJSON = exports.isIgnorableWarning = exports.ExifToolTask = exports.ExifTime = exports.ExifDateTime = exports.ExifDate = exports.BinaryField = void 0;
|
|
30
30
|
const bc = __importStar(require("batch-cluster"));
|
|
31
31
|
const _cp = __importStar(require("child_process"));
|
|
32
32
|
const _fs = __importStar(require("fs"));
|
|
33
|
-
const _os = __importStar(require("os"));
|
|
34
|
-
const _path = __importStar(require("path"));
|
|
35
33
|
const process_1 = __importDefault(require("process"));
|
|
36
34
|
const AsyncRetry_1 = require("./AsyncRetry");
|
|
37
35
|
const BinaryExtractionTask_1 = require("./BinaryExtractionTask");
|
|
38
36
|
const BinaryToBufferTask_1 = require("./BinaryToBufferTask");
|
|
37
|
+
const DefaultExifToolOptions_1 = require("./DefaultExifToolOptions");
|
|
39
38
|
const DeleteAllTagsArgs_1 = require("./DeleteAllTagsArgs");
|
|
40
|
-
const GeoTz_1 = require("./GeoTz");
|
|
41
|
-
const IgnorableError_1 = require("./IgnorableError");
|
|
42
39
|
const IsWin32_1 = require("./IsWin32");
|
|
43
40
|
const Lazy_1 = require("./Lazy");
|
|
41
|
+
const Pick_1 = require("./Pick");
|
|
44
42
|
const ReadRawTask_1 = require("./ReadRawTask");
|
|
45
43
|
const ReadTask_1 = require("./ReadTask");
|
|
46
44
|
const RewriteAllTagsTask_1 = require("./RewriteAllTagsTask");
|
|
@@ -57,8 +55,8 @@ var ExifTime_1 = require("./ExifTime");
|
|
|
57
55
|
Object.defineProperty(exports, "ExifTime", { enumerable: true, get: function () { return ExifTime_1.ExifTime; } });
|
|
58
56
|
var ExifToolTask_1 = require("./ExifToolTask");
|
|
59
57
|
Object.defineProperty(exports, "ExifToolTask", { enumerable: true, get: function () { return ExifToolTask_1.ExifToolTask; } });
|
|
60
|
-
var
|
|
61
|
-
Object.defineProperty(exports, "isIgnorableWarning", { enumerable: true, get: function () { return
|
|
58
|
+
var IgnorableError_1 = require("./IgnorableError");
|
|
59
|
+
Object.defineProperty(exports, "isIgnorableWarning", { enumerable: true, get: function () { return IgnorableError_1.isIgnorableWarning; } });
|
|
62
60
|
var JSON_1 = require("./JSON");
|
|
63
61
|
Object.defineProperty(exports, "parseJSON", { enumerable: true, get: function () { return JSON_1.parseJSON; } });
|
|
64
62
|
var Timezones_1 = require("./Timezones");
|
|
@@ -67,67 +65,7 @@ Object.defineProperty(exports, "offsetMinutesToZoneName", { enumerable: true, ge
|
|
|
67
65
|
Object.defineProperty(exports, "UnsetZone", { enumerable: true, get: function () { return Timezones_1.UnsetZone; } });
|
|
68
66
|
Object.defineProperty(exports, "UnsetZoneName", { enumerable: true, get: function () { return Timezones_1.UnsetZoneName; } });
|
|
69
67
|
Object.defineProperty(exports, "UnsetZoneOffsetMinutes", { enumerable: true, get: function () { return Timezones_1.UnsetZoneOffsetMinutes; } });
|
|
70
|
-
function findExiftool() {
|
|
71
|
-
const path = require(`exiftool-vendored.${(0, IsWin32_1.isWin32)() ? "exe" : "pl"}`);
|
|
72
|
-
// This s/app.asar/app.asar.unpacked/ path switch adds support for Electron
|
|
73
|
-
// apps that are ASAR-packed.
|
|
74
|
-
// Note that we can't check for electron because child processes that are
|
|
75
|
-
// spawned by the main process will most likely need the ELECTRON_RUN_AS_NODE
|
|
76
|
-
// environment variable set, which will unset the process.versions.electron
|
|
77
|
-
// field.
|
|
78
|
-
const fixedPath = path
|
|
79
|
-
.split(_path.sep)
|
|
80
|
-
.map((ea) => (ea === "app.asar" ? "app.asar.unpacked" : ea))
|
|
81
|
-
.join(_path.sep);
|
|
82
|
-
// Note also, that we must check for the fixedPath first, because Electron's
|
|
83
|
-
// ASAR shenanigans will make existsSync return true even for asar-packed
|
|
84
|
-
// resources.
|
|
85
|
-
if (_fs.existsSync(fixedPath)) {
|
|
86
|
-
return fixedPath;
|
|
87
|
-
}
|
|
88
|
-
if (_fs.existsSync(path)) {
|
|
89
|
-
return path;
|
|
90
|
-
}
|
|
91
|
-
throw new Error(`Vendored ExifTool does not exist at ${path}`);
|
|
92
|
-
}
|
|
93
|
-
exports.DefaultExifToolPath = findExiftool();
|
|
94
|
-
exports.DefaultExiftoolArgs = ["-stay_open", "True", "-@", "-"];
|
|
95
68
|
const _ignoreShebang = (0, Lazy_1.lazy)(() => !(0, IsWin32_1.isWin32)() && !_fs.existsSync("/usr/bin/perl"));
|
|
96
|
-
exports.DefaultMaxProcs = Math.max(1, Math.floor(_os.cpus().length / 4));
|
|
97
|
-
/**
|
|
98
|
-
* Default values for `ExifToolOptions`, except for `processFactory` (which is
|
|
99
|
-
* created by the ExifTool constructor)
|
|
100
|
-
*/
|
|
101
|
-
exports.DefaultExifToolOptions = Object.freeze({
|
|
102
|
-
...new bc.BatchClusterOptions(),
|
|
103
|
-
maxProcs: exports.DefaultMaxProcs,
|
|
104
|
-
maxTasksPerProcess: 500,
|
|
105
|
-
spawnTimeoutMillis: 30000,
|
|
106
|
-
// see https://github.com/photostructure/exiftool-vendored.js/issues/34 :
|
|
107
|
-
taskTimeoutMillis: 20000,
|
|
108
|
-
onIdleIntervalMillis: 2000,
|
|
109
|
-
taskRetries: 1,
|
|
110
|
-
exiftoolPath: exports.DefaultExifToolPath,
|
|
111
|
-
exiftoolArgs: exports.DefaultExiftoolArgs,
|
|
112
|
-
exiftoolEnv: {},
|
|
113
|
-
pass: "{ready}",
|
|
114
|
-
fail: "{ready}",
|
|
115
|
-
exitCommand: "-stay_open\nFalse\n",
|
|
116
|
-
versionCommand: new VersionTask_1.VersionTask().command,
|
|
117
|
-
healthCheckIntervalMillis: 30000,
|
|
118
|
-
healthCheckCommand: "-ver\n-execute\n",
|
|
119
|
-
numericTags: [
|
|
120
|
-
"*Duration*",
|
|
121
|
-
"GPSAltitude",
|
|
122
|
-
"GPSLatitude",
|
|
123
|
-
"GPSLongitude",
|
|
124
|
-
"GPSPosition",
|
|
125
|
-
"Orientation",
|
|
126
|
-
],
|
|
127
|
-
defaultVideosToUTC: true,
|
|
128
|
-
geoTz: GeoTz_1.geoTz,
|
|
129
|
-
isIgnorableError: IgnorableError_1.isIgnorableWarning,
|
|
130
|
-
});
|
|
131
69
|
/**
|
|
132
70
|
* Manages delegating calls to a vendored running instance of ExifTool.
|
|
133
71
|
*
|
|
@@ -146,7 +84,7 @@ class ExifTool {
|
|
|
146
84
|
throw new Error("Please update caller to the new ExifTool constructor API");
|
|
147
85
|
}
|
|
148
86
|
const o = {
|
|
149
|
-
...
|
|
87
|
+
...DefaultExifToolOptions_1.DefaultExifToolOptions,
|
|
150
88
|
...options,
|
|
151
89
|
};
|
|
152
90
|
const ignoreShebang = (_a = o.ignoreShebang) !== null && _a !== void 0 ? _a : _ignoreShebang();
|
|
@@ -184,44 +122,49 @@ class ExifTool {
|
|
|
184
122
|
* Read the tags in `file`.
|
|
185
123
|
*
|
|
186
124
|
* @param {string} file the file to extract metadata tags from
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
125
|
+
*
|
|
126
|
+
* @param {string[]} [optionalArgs] any additional ExifTool arguments, like
|
|
127
|
+
* "-fast" or "-fast2". **Most other arguments will require you to use
|
|
128
|
+
* `readRaw`.** Note that the default is "-fast", so if you want ExifTool to
|
|
129
|
+
* read the entire file for metadata, you should pass an empty array as the
|
|
130
|
+
* second parameter. See https://exiftool.org/#performance for more
|
|
131
|
+
* information about `-fast` and `-fast2`.
|
|
132
|
+
*
|
|
193
133
|
* @returns {Promise<Tags>} A resolved Tags promise. If there are errors
|
|
194
134
|
* during reading, the `.errors` field will be present.
|
|
195
|
-
* @memberof ExifTool
|
|
196
135
|
*/
|
|
197
|
-
read(file, optionalArgs = ["-fast"]) {
|
|
136
|
+
read(file, optionalArgs = ["-fast"], options) {
|
|
198
137
|
return this.enqueueTask(() => ReadTask_1.ReadTask.for(file, {
|
|
199
138
|
optionalArgs,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
geoTz: this.options.geoTz,
|
|
139
|
+
...(0, Pick_1.pick)(this.options, "numericTags", "useMWG", "includeImageDataMD5", "defaultVideosToUTC", "geoTz"),
|
|
140
|
+
...options,
|
|
203
141
|
})); // < no way to know at compile time if we're going to get back a T!
|
|
204
142
|
}
|
|
205
143
|
/**
|
|
206
|
-
* Read the tags from `file`, without any post-processing of ExifTool
|
|
144
|
+
* Read the tags from `file`, without any post-processing of ExifTool
|
|
145
|
+
* values.
|
|
207
146
|
*
|
|
208
|
-
* **You probably want `read`, not this method. READ THE REST OF THIS
|
|
209
|
-
* CAREFULLY.**
|
|
147
|
+
* **You probably want `read`, not this method. READ THE REST OF THIS
|
|
148
|
+
* COMMENT CAREFULLY.**
|
|
210
149
|
*
|
|
211
|
-
* If you want to extract specific tag values from a file, you may want to
|
|
212
|
-
* this, but all data validation and inference heuristics provided by
|
|
213
|
-
* will be skipped.
|
|
150
|
+
* If you want to extract specific tag values from a file, you may want to
|
|
151
|
+
* use this, but all data validation and inference heuristics provided by
|
|
152
|
+
* `read` will be skipped.
|
|
214
153
|
*
|
|
215
|
-
* Note that performance will be very similar to `read`, and will actually
|
|
216
|
-
* worse if you don't include `-fast` or `-fast2` (as the most expensive
|
|
217
|
-
* is the perl interpreter and scanning the file on disk).
|
|
154
|
+
* Note that performance will be very similar to `read`, and will actually
|
|
155
|
+
* be worse if you don't include `-fast` or `-fast2` (as the most expensive
|
|
156
|
+
* bit is the perl interpreter and scanning the file on disk).
|
|
218
157
|
*
|
|
219
|
-
* @param args any additional arguments other than the file path. Note that
|
|
158
|
+
* @param args any additional arguments other than the file path. Note that
|
|
159
|
+
* "-json", and the Windows unicode filename handler flags, "-charset
|
|
160
|
+
* filename=utf8", will be added automatically.
|
|
220
161
|
*
|
|
221
162
|
* @return Note that the return value will be similar to `Tags`, but with no
|
|
222
|
-
* date, time, or other rich type parsing that you get from `.read()`. The
|
|
163
|
+
* date, time, or other rich type parsing that you get from `.read()`. The
|
|
164
|
+
* field values will be `string | number | string[]`.
|
|
223
165
|
*
|
|
224
|
-
* @see https://github.com/photostructure/exiftool-vendored.js/issues/44
|
|
166
|
+
* @see https://github.com/photostructure/exiftool-vendored.js/issues/44 for
|
|
167
|
+
* typing details.
|
|
225
168
|
*/
|
|
226
169
|
readRaw(file, args = []) {
|
|
227
170
|
return this.enqueueTask(() => ReadRawTask_1.ReadRawTask.for(file, args));
|
|
@@ -238,9 +181,12 @@ class ExifTool {
|
|
|
238
181
|
* there are errors or warnings.
|
|
239
182
|
* @memberof ExifTool
|
|
240
183
|
*/
|
|
241
|
-
write(file, tags, args) {
|
|
184
|
+
write(file, tags, args, options) {
|
|
242
185
|
const retriable = false;
|
|
243
|
-
return this.enqueueTask(() => WriteTask_1.WriteTask.for(file, tags, args
|
|
186
|
+
return this.enqueueTask(() => WriteTask_1.WriteTask.for(file, tags, args, {
|
|
187
|
+
...(0, Pick_1.pick)(this.options, "useMWG"),
|
|
188
|
+
...options,
|
|
189
|
+
}), retriable);
|
|
244
190
|
}
|
|
245
191
|
/**
|
|
246
192
|
* This will strip `file` of all metadata tags. The original file (with the
|
package/dist/ExifTool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifTool.js","sourceRoot":"","sources":["../src/ExifTool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,mDAAoC;AACpC,wCAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"ExifTool.js","sourceRoot":"","sources":["../src/ExifTool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,mDAAoC;AAC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AAC,cAAc,CAAA;IACzC,CAAC;IAED;;;OAGG;IACH,mBAAmB,CAAC,UAAU,GAAG,IAAI;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC1D,CAAC;CACF;AAzWD,4BAyWC;AAED;;;;;;;;;;GAUG;AACU,QAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA"}
|
|
@@ -61,14 +61,40 @@ export interface ExifToolOptions extends bc.BatchClusterOptions, bc.BatchProcess
|
|
|
61
61
|
*/
|
|
62
62
|
exiftoolEnv: NodeJS.ProcessEnv;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
64
|
+
* Should ExifTool use MWG (Metadata Working Group) composite tags for
|
|
65
|
+
* reading and writing tags?
|
|
66
66
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
67
|
+
* ExifTool recommends this to be set to true.
|
|
68
|
+
*
|
|
69
|
+
* Note that this can result in many tag value differences from
|
|
70
|
+
* `ExifTool.read`, and makes `ExifTool.write` write to "synonymous" MWG
|
|
71
|
+
* tags automatically.
|
|
72
|
+
*
|
|
73
|
+
* @see https://exiftool.org/TagNames/MWG.html for details
|
|
74
|
+
*/
|
|
75
|
+
useMWG: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Tag names (which can have '*' glob matchers) which you want numeric
|
|
78
|
+
* values, rather than ExifTool's "Print Conversion."
|
|
79
|
+
*
|
|
80
|
+
* If you're using tag values only for human consumption, you may want to
|
|
81
|
+
* leave this blank.
|
|
82
|
+
*
|
|
83
|
+
* The default includes "*Duration*", "GPSAltitude", "GPSLatitude",
|
|
84
|
+
* "GPSLongitude", "GPSPosition", and "Orientation".
|
|
70
85
|
*/
|
|
71
86
|
numericTags: string[];
|
|
87
|
+
/**
|
|
88
|
+
* If set to true, ExifTool will attempt to calculate an "ImageDataMD5" tag
|
|
89
|
+
* value with the MD5 checksum of image data.
|
|
90
|
+
*
|
|
91
|
+
* Note that as of 2022-04-12, ExifTool supports JPEG, PNG, and many raw
|
|
92
|
+
* image formats, like CR2 and NEF. It doesn't yet support HEIC/HEIF, ORF,
|
|
93
|
+
* GIF, and many video formats, like MP4 and MTS.
|
|
94
|
+
*
|
|
95
|
+
* This defaults to false, as it adds ~20ms of overhead to every read
|
|
96
|
+
*/
|
|
97
|
+
includeImageDataMD5: boolean;
|
|
72
98
|
/**
|
|
73
99
|
* Video file dates are assumed to be in UTC, rather than using timezone
|
|
74
100
|
* inference used in images. To disable this default, set this to false.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DefaultExifToolPath: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DefaultExifToolPath = void 0;
|
|
27
|
+
const _fs = __importStar(require("fs"));
|
|
28
|
+
const _path = __importStar(require("path"));
|
|
29
|
+
const IsWin32_1 = require("./IsWin32");
|
|
30
|
+
function findExiftool() {
|
|
31
|
+
const path = require(`exiftool-vendored.${(0, IsWin32_1.isWin32)() ? "exe" : "pl"}`);
|
|
32
|
+
// This s/app.asar/app.asar.unpacked/ path switch adds support for Electron
|
|
33
|
+
// apps that are ASAR-packed.
|
|
34
|
+
// Note that we can't check for electron because child processes that are
|
|
35
|
+
// spawned by the main process will most likely need the ELECTRON_RUN_AS_NODE
|
|
36
|
+
// environment variable set, which will unset the process.versions.electron
|
|
37
|
+
// field.
|
|
38
|
+
const fixedPath = path
|
|
39
|
+
.split(_path.sep)
|
|
40
|
+
.map((ea) => (ea === "app.asar" ? "app.asar.unpacked" : ea))
|
|
41
|
+
.join(_path.sep);
|
|
42
|
+
// Note also, that we must check for the fixedPath first, because Electron's
|
|
43
|
+
// ASAR shenanigans will make existsSync return true even for asar-packed
|
|
44
|
+
// resources.
|
|
45
|
+
if (_fs.existsSync(fixedPath)) {
|
|
46
|
+
return fixedPath;
|
|
47
|
+
}
|
|
48
|
+
if (_fs.existsSync(path)) {
|
|
49
|
+
return path;
|
|
50
|
+
}
|
|
51
|
+
throw new Error(`Vendored ExifTool does not exist at ${path}`);
|
|
52
|
+
}
|
|
53
|
+
exports.DefaultExifToolPath = findExiftool();
|
|
54
|
+
//# sourceMappingURL=FindExiftool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindExiftool.js","sourceRoot":"","sources":["../src/FindExiftool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAyB;AACzB,4CAA6B;AAC7B,uCAAmC;AAEnC,SAAS,YAAY;IACnB,MAAM,IAAI,GAAW,OAAO,CAAC,qBAAqB,IAAA,iBAAO,GAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IAC7E,2EAA2E;IAC3E,6BAA6B;IAC7B,yEAAyE;IACzE,6EAA6E;IAC7E,2EAA2E;IAC3E,SAAS;IACT,MAAM,SAAS,GAAG,IAAI;SACnB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;SAChB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAElB,4EAA4E;IAC5E,yEAAyE;IACzE,aAAa;IACb,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;QAC7B,OAAO,SAAS,CAAA;KACjB;IACD,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QACxB,OAAO,IAAI,CAAA;KACZ;IACD,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,EAAE,CAAC,CAAA;AAChE,CAAC;AAEY,QAAA,mBAAmB,GAAG,YAAY,EAAE,CAAA"}
|
package/dist/Pick.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function pick<T, K extends keyof T>(obj: T, ...keyNames: K[]): Pick<T, K>;
|
package/dist/Pick.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pick = void 0;
|
|
4
|
+
function pick(obj, ...keyNames) {
|
|
5
|
+
if (obj == null)
|
|
6
|
+
return obj;
|
|
7
|
+
const result = {};
|
|
8
|
+
for (const key of keyNames) {
|
|
9
|
+
const v = obj[key];
|
|
10
|
+
if (v !== undefined)
|
|
11
|
+
result[key] = obj[key];
|
|
12
|
+
}
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
exports.pick = pick;
|
|
16
|
+
//# sourceMappingURL=Pick.js.map
|
package/dist/Pick.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pick.js","sourceRoot":"","sources":["../src/Pick.ts"],"names":[],"mappings":";;;AAAA,SAAgB,IAAI,CAClB,GAAM,EACN,GAAG,QAAa;IAEhB,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,GAAG,CAAA;IAC3B,MAAM,MAAM,GAAG,EAAS,CAAA;IACxB,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;QAC1B,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QAClB,IAAI,CAAC,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;KAC5C;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAXD,oBAWC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Literal = string | number | boolean;
|
|
2
|
+
export type Json = Literal | {
|
|
3
|
+
[key: string]: Json;
|
|
4
|
+
} | Json[];
|
|
5
|
+
/**
|
|
6
|
+
* Loosely typed raw result from ExifTool
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/photostructure/exiftool-vendored.js/issues/138
|
|
9
|
+
*/
|
|
10
|
+
export type RawTags = Record<string, Json>;
|
package/dist/RawTags.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RawTags.js","sourceRoot":"","sources":["../src/RawTags.ts"],"names":[],"mappings":""}
|
package/dist/ReadRawTask.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ExifToolTask } from "./ExifToolTask";
|
|
2
|
-
import {
|
|
3
|
-
export declare class ReadRawTask extends ExifToolTask<
|
|
2
|
+
import { RawTags } from "./RawTags";
|
|
3
|
+
export declare class ReadRawTask extends ExifToolTask<RawTags> {
|
|
4
4
|
readonly sourceFile: string;
|
|
5
5
|
readonly args: string[];
|
|
6
6
|
static for(filename: string, exiftoolArgs?: string[]): ReadRawTask;
|
|
7
7
|
private constructor();
|
|
8
8
|
toString(): string;
|
|
9
|
-
protected parse(data: string, err?: Error):
|
|
9
|
+
protected parse(data: string, err?: Error): RawTags;
|
|
10
10
|
}
|
package/dist/ReadRawTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRawTask.js","sourceRoot":"","sources":["../src/ReadRawTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAsC;AACtC,4CAA6B;AAC7B,iDAA6C;AAC7C,+DAA+D;AAG/D,MAAa,WAAY,SAAQ,
|
|
1
|
+
{"version":3,"file":"ReadRawTask.js","sourceRoot":"","sources":["../src/ReadRawTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAsC;AACtC,4CAA6B;AAC7B,iDAA6C;AAC7C,+DAA+D;AAG/D,MAAa,WAAY,SAAQ,2BAAqB;IACpD,MAAM,CAAC,GAAG,CAAC,QAAgB,EAAE,eAAyB,EAAE;QACtD,MAAM,IAAI,GAAa,CAAC,GAAG,6CAAuB,EAAE,GAAG,YAAY,CAAC,CAAA;QACpE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACrB,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC;IAED,YACW,UAAkB,EACT,IAAc;QAEhC,KAAK,CAAC,IAAI,CAAC,CAAA;QAHF,eAAU,GAAV,UAAU,CAAQ;QACT,SAAI,GAAJ,IAAI,CAAU;IAGlC,CAAC;IAEQ,QAAQ;QACf,OAAO,aAAa,GAAG,IAAI,CAAC,UAAU,GAAG,GAAG,CAAA;IAC9C,CAAC;IAES,KAAK,CAAC,IAAY,EAAE,GAAW;QACvC,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;SAC3B;QAAC,OAAO,SAAS,EAAE;YAClB,IAAA,sBAAM,GAAE,CAAC,KAAK,CAAC,sCAAsC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;YAChE,MAAM,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,SAAS,CAAA;SACvB;IACH,CAAC;CACF;AA5BD,kCA4BC"}
|
package/dist/ReadTask.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { ExifToolOptions } from "./ExifToolOptions";
|
|
2
1
|
import { ExifToolTask } from "./ExifToolTask";
|
|
3
2
|
import { Tags } from "./Tags";
|
|
4
3
|
export declare function nullish(s: string | undefined): s is undefined;
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export declare const DefaultReadTaskOptions: {
|
|
5
|
+
readonly useMWG: boolean;
|
|
6
|
+
readonly numericTags: string[];
|
|
7
|
+
readonly includeImageDataMD5: boolean;
|
|
8
|
+
readonly defaultVideosToUTC: boolean;
|
|
9
|
+
readonly geoTz: typeof import("./GeoTz").geoTz;
|
|
10
|
+
readonly optionalArgs: string[];
|
|
11
|
+
};
|
|
12
|
+
export type ReadTaskOptions = typeof DefaultReadTaskOptions;
|
|
8
13
|
export declare class ReadTask extends ExifToolTask<Tags> {
|
|
9
14
|
#private;
|
|
10
15
|
readonly sourceFile: string;
|
|
@@ -22,7 +27,7 @@ export declare class ReadTask extends ExifToolTask<Tags> {
|
|
|
22
27
|
private tz;
|
|
23
28
|
private tzSource?;
|
|
24
29
|
private constructor();
|
|
25
|
-
static for(filename: string, options: ReadTaskOptions): ReadTask;
|
|
30
|
+
static for(filename: string, options: Partial<ReadTaskOptions>): ReadTask;
|
|
26
31
|
toString(): string;
|
|
27
32
|
parse(data: string, err?: Error): Tags;
|
|
28
33
|
}
|
package/dist/ReadTask.js
CHANGED
|
@@ -29,10 +29,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
29
29
|
};
|
|
30
30
|
var _ReadTask_instances, _ReadTask_tagName, _ReadTask_parseTags, _ReadTask_extractLatLon, _ReadTask_latlon, _ReadTask_geoTz, _ReadTask_extractTzOffset, _ReadTask_parseTag;
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.ReadTask = exports.nullish = void 0;
|
|
32
|
+
exports.ReadTask = exports.DefaultReadTaskOptions = exports.nullish = void 0;
|
|
33
33
|
const batch_cluster_1 = require("batch-cluster");
|
|
34
34
|
const _path = __importStar(require("path"));
|
|
35
35
|
const BinaryField_1 = require("./BinaryField");
|
|
36
|
+
const DefaultExifToolOptions_1 = require("./DefaultExifToolOptions");
|
|
36
37
|
const ExifDate_1 = require("./ExifDate");
|
|
37
38
|
const ExifDateTime_1 = require("./ExifDateTime");
|
|
38
39
|
const ExifTime_1 = require("./ExifTime");
|
|
@@ -42,6 +43,7 @@ const FirstDateTime_1 = require("./FirstDateTime");
|
|
|
42
43
|
const Lazy_1 = require("./Lazy");
|
|
43
44
|
const Maybe_1 = require("./Maybe");
|
|
44
45
|
const Number_1 = require("./Number");
|
|
46
|
+
const Pick_1 = require("./Pick");
|
|
45
47
|
const String_1 = require("./String");
|
|
46
48
|
const Timezones_1 = require("./Timezones");
|
|
47
49
|
/**
|
|
@@ -59,6 +61,10 @@ function nullish(s) {
|
|
|
59
61
|
return s == null || ((0, String_1.isString)(s) && NullIsh.includes(s.trim()));
|
|
60
62
|
}
|
|
61
63
|
exports.nullish = nullish;
|
|
64
|
+
exports.DefaultReadTaskOptions = {
|
|
65
|
+
optionalArgs: [],
|
|
66
|
+
...(0, Pick_1.pick)(DefaultExifToolOptions_1.DefaultExifToolOptions, "numericTags", "useMWG", "includeImageDataMD5", "defaultVideosToUTC", "geoTz"),
|
|
67
|
+
};
|
|
62
68
|
class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
63
69
|
constructor(sourceFile, args, options) {
|
|
64
70
|
super(args);
|
|
@@ -97,21 +103,26 @@ class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
|
97
103
|
this.tags.errors = this.errors;
|
|
98
104
|
}
|
|
99
105
|
static for(filename, options) {
|
|
100
|
-
|
|
106
|
+
const opts = { ...exports.DefaultReadTaskOptions, ...options };
|
|
101
107
|
const sourceFile = _path.resolve(filename);
|
|
102
108
|
const args = [
|
|
103
109
|
...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs,
|
|
104
110
|
"-json",
|
|
105
111
|
"-struct",
|
|
106
|
-
...
|
|
112
|
+
...opts.optionalArgs,
|
|
107
113
|
];
|
|
114
|
+
if (opts.useMWG) {
|
|
115
|
+
args.push("-use", "MWG");
|
|
116
|
+
}
|
|
117
|
+
if (opts.includeImageDataMD5) {
|
|
118
|
+
args.push("-imagedatamd5");
|
|
119
|
+
}
|
|
108
120
|
// IMPORTANT: "-all" must be after numeric tag references (first reference
|
|
109
121
|
// in wins)
|
|
110
|
-
args.push(...
|
|
111
|
-
// TODO: Do you need -xmp:all, -all, or -all:all?
|
|
122
|
+
args.push(...opts.numericTags.map((ea) => "-" + ea + "#"));
|
|
123
|
+
// TODO: Do you need -xmp:all, -all, or -all:all? Is -* better?
|
|
112
124
|
args.push("-all", sourceFile);
|
|
113
|
-
|
|
114
|
-
return new ReadTask(sourceFile, args, options);
|
|
125
|
+
return new ReadTask(sourceFile, args, opts);
|
|
115
126
|
}
|
|
116
127
|
toString() {
|
|
117
128
|
return "ReadTask" + this.sourceFile + ")";
|
|
@@ -156,9 +167,9 @@ _ReadTask_extractLatLon = new WeakMap(), _ReadTask_geoTz = new WeakMap(), _ReadT
|
|
|
156
167
|
__classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_extractTzOffset).call(this);
|
|
157
168
|
(0, Maybe_1.map)(this.tz, (ea) => (this.tags.tz = ea));
|
|
158
169
|
(0, Maybe_1.map)(this.tzSource, (ea) => (this.tags.tzSource = ea));
|
|
159
|
-
const t = this.tags; // tsc hack :(
|
|
160
170
|
for (const key of Object.keys(this._raw)) {
|
|
161
|
-
|
|
171
|
+
const val = __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_parseTag).call(this, __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_tagName).call(this, key), this._raw[key]);
|
|
172
|
+
this.tags[key] = val;
|
|
162
173
|
}
|
|
163
174
|
if (this.errors.length > 0)
|
|
164
175
|
this.tags.errors = this.errors;
|
package/dist/ReadTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadTask.js","sourceRoot":"","sources":["../src/ReadTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAsC;AACtC,4CAA6B;AAC7B,+CAA2C;AAC3C,yCAAqC;AACrC,iDAA6C;AAC7C,yCAAqC;
|
|
1
|
+
{"version":3,"file":"ReadTask.js","sourceRoot":"","sources":["../src/ReadTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAsC;AACtC,4CAA6B;AAC7B,+CAA2C;AAC3C,qEAAiE;AACjE,yCAAqC;AACrC,iDAA6C;AAC7C,yCAAqC;AACrC,iDAA6C;AAC7C,+DAA+D;AAC/D,mDAA+C;AAC/C,iCAA6B;AAC7B,mCAAgD;AAChD,qCAAkC;AAClC,iCAA6B;AAC7B,qCAA+C;AAE/C,2CAIoB;AAEpB;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,iBAAiB;IACjB,eAAe;IACf,WAAW;IACX,UAAU;IACV,mBAAmB;CACpB,CAAA;AAED,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;AA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AAC,CAAA;gBAE/B,IAAI,CAAC,IAAI,IAAI,EAAE;oBACb,OAAO,CAAC,CAAA;iBACT;aACF;YACD,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC5B,MAAM,CAAC,GAAG,mBAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAClC,IAAI,CAAC,IAAI,IAAI;oBAAE,OAAO,CAAC,CAAA;aACxB;SACF;QACD,wEAAwE;QACxE,OAAO,KAAK,CAAA;KACb;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,QAAQ,CACX,mBAAmB,OAAO,eAAe,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CACvE,CAAA;QACD,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AAGH,SAAS,YAAY,CAAC,OAAe;IACnC,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC"}
|
package/dist/Tags.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface FileTags {
|
|
|
28
28
|
CurrentIPTCDigest?: string;
|
|
29
29
|
/** ★★★★ ✔ Example: "/home/username/pictures" */
|
|
30
30
|
Directory?: string;
|
|
31
|
-
/** ★★★★ ✔ Example: "2023:04:11
|
|
31
|
+
/** ★★★★ ✔ Example: "2023:04:12 11:10:21-07:00" */
|
|
32
32
|
FileAccessDate?: ExifDateTime | string;
|
|
33
33
|
/** ★★★★ ✔ Example: "2023:01:30 11:33:43-08:00" */
|
|
34
34
|
FileInodeChangeDate?: ExifDateTime | string;
|
|
@@ -44,6 +44,8 @@ export interface FileTags {
|
|
|
44
44
|
FileType?: string;
|
|
45
45
|
/** ★★★★ ✔ Example: "rw2" */
|
|
46
46
|
FileTypeExtension?: string;
|
|
47
|
+
/** ☆☆☆☆ Example: */
|
|
48
|
+
ImageDataMD5?: string;
|
|
47
49
|
/** ★★★★ ✔ Example: 8 */
|
|
48
50
|
ImageHeight?: number;
|
|
49
51
|
/** ☆☆☆☆ ✔ Example: 230400 */
|
|
@@ -202,7 +204,7 @@ export interface APP1Tags {
|
|
|
202
204
|
CreatorSoftware?: string;
|
|
203
205
|
/** ☆☆☆☆ Example: "2013:03:12 16:31:26" */
|
|
204
206
|
DateTimeGenerated?: ExifDateTime | string;
|
|
205
|
-
/** ☆☆☆☆ Example: "(Binary data
|
|
207
|
+
/** ☆☆☆☆ Example: "(Binary data 1011393 bytes, use -b option to extract)" */
|
|
206
208
|
EmbeddedImage?: BinaryField | string;
|
|
207
209
|
/** ☆☆☆☆ Example: 960 */
|
|
208
210
|
EmbeddedImageHeight?: number;
|
|
@@ -810,7 +812,7 @@ export interface EXIFTags {
|
|
|
810
812
|
SubjectDistance?: string;
|
|
811
813
|
/** ★★★☆ ✔ Example: "Unknown (4400)" */
|
|
812
814
|
SubjectDistanceRange?: string;
|
|
813
|
-
/** ★★★★ ✔ Example: "(Binary data
|
|
815
|
+
/** ★★★★ ✔ Example: "(Binary data 10202 bytes, use -b option to extract)" */
|
|
814
816
|
ThumbnailImage?: BinaryField;
|
|
815
817
|
/** ☆☆☆☆ ✔ Example: "(Binary data 57816 bytes, use -b option to extract)" */
|
|
816
818
|
ThumbnailTIFF?: BinaryField;
|
|
@@ -818,7 +820,7 @@ export interface EXIFTags {
|
|
|
818
820
|
TileByteCounts?: BinaryField | string;
|
|
819
821
|
/** ☆☆☆☆ ✔ Example: 512 */
|
|
820
822
|
TileLength?: number;
|
|
821
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
823
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 507 bytes, use -b option to extract)" */
|
|
822
824
|
TileOffsets?: BinaryField | string;
|
|
823
825
|
/** ☆☆☆☆ ✔ Example: 512 */
|
|
824
826
|
TileWidth?: number;
|
|
@@ -844,7 +846,7 @@ export interface EXIFTags {
|
|
|
844
846
|
WaterDepth?: number;
|
|
845
847
|
/** ☆☆☆☆ ✔ Example: "0.4234 0.399" */
|
|
846
848
|
WhitePoint?: string;
|
|
847
|
-
/** ☆☆☆☆ ✔ Example: "
|
|
849
|
+
/** ☆☆☆☆ ✔ Example: "Norm De Plume" */
|
|
848
850
|
XPAuthor?: string;
|
|
849
851
|
/** ☆☆☆☆ ✔ Example: "This is a comment." */
|
|
850
852
|
XPComment?: string;
|
|
@@ -886,7 +888,7 @@ export interface APP6Tags {
|
|
|
886
888
|
WhiteBalance?: string;
|
|
887
889
|
}
|
|
888
890
|
export interface FlashPixTags {
|
|
889
|
-
/** ☆☆☆☆ Example: "(Binary data
|
|
891
|
+
/** ☆☆☆☆ Example: "(Binary data 20796 bytes, use -b option to extract)" */
|
|
890
892
|
AudioStream?: BinaryField | string;
|
|
891
893
|
/** ☆☆☆☆ ✔ Example: "Unicode UTF-16, little endian" */
|
|
892
894
|
CodePage?: string;
|
|
@@ -904,7 +906,7 @@ export interface FlashPixTags {
|
|
|
904
906
|
ExtensionName?: string;
|
|
905
907
|
/** ☆☆☆☆ ✔ Example: "Invalidated By Modification" */
|
|
906
908
|
ExtensionPersistence?: string;
|
|
907
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
909
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 46285 bytes, use -b option to extract)" */
|
|
908
910
|
ScreenNail?: BinaryField | string;
|
|
909
911
|
/** ☆☆☆☆ ✔ Example: 1 */
|
|
910
912
|
UsedExtensionNumbers?: number;
|
|
@@ -1050,7 +1052,7 @@ export interface PhotoshopTags {
|
|
|
1050
1052
|
PhotoshopFormat?: string;
|
|
1051
1053
|
/** ☆☆☆☆ ✔ Example: 9 */
|
|
1052
1054
|
PhotoshopQuality?: number;
|
|
1053
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
1055
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 5768 bytes, use -b option to extract)" */
|
|
1054
1056
|
PhotoshopThumbnail?: BinaryField | string;
|
|
1055
1057
|
/** ☆☆☆☆ ✔ Example: 1 */
|
|
1056
1058
|
PixelAspectRatio?: number;
|
|
@@ -1080,7 +1082,7 @@ export interface QuickTimeTags {
|
|
|
1080
1082
|
AudioSampleRate?: number;
|
|
1081
1083
|
/** ☆☆☆☆ ✔ Example: "Panasonic" */
|
|
1082
1084
|
AudioVendorID?: string;
|
|
1083
|
-
/** ☆☆☆☆ ✔ Example: "
|
|
1085
|
+
/** ☆☆☆☆ ✔ Example: "Norm De Plume" */
|
|
1084
1086
|
Author?: string;
|
|
1085
1087
|
/** ☆☆☆☆ ✔ Example: "65535 65535 65535" */
|
|
1086
1088
|
BackgroundColor?: string;
|
|
@@ -1996,7 +1998,7 @@ export interface MakerNotesTags {
|
|
|
1996
1998
|
DSPFirmwareVersion?: string;
|
|
1997
1999
|
/** ☆☆☆☆ ✔ Example: "Yes" */
|
|
1998
2000
|
DarkFocusEnvironment?: string;
|
|
1999
|
-
/** ★★☆☆ ✔ Example: "(Binary data
|
|
2001
|
+
/** ★★☆☆ ✔ Example: "(Binary data 280 bytes, use -b option to extract)" */
|
|
2000
2002
|
DataDump?: BinaryField | string;
|
|
2001
2003
|
/** ☆☆☆☆ ✔ Example: 8289 */
|
|
2002
2004
|
DataScaling?: number;
|
|
@@ -2542,8 +2544,6 @@ export interface MakerNotesTags {
|
|
|
2542
2544
|
HDRShot?: string;
|
|
2543
2545
|
/** ☆☆☆☆ ✔ Example: "n/a" */
|
|
2544
2546
|
HDRSmoothing?: string;
|
|
2545
|
-
/** ★☆☆☆ ✔ Example: "n/a" */
|
|
2546
|
-
HighISONoiseReduction?: string;
|
|
2547
2547
|
/** ☆☆☆☆ Example: 4 */
|
|
2548
2548
|
HighLowKeyAdj?: number;
|
|
2549
2549
|
/** ☆☆☆☆ ✔ Example: "Off" */
|
|
@@ -3108,7 +3108,7 @@ export interface MakerNotesTags {
|
|
|
3108
3108
|
NDFilter?: string;
|
|
3109
3109
|
/** ☆☆☆☆ ✔ Example: "Uncompressed (reduced to 12 bit)" */
|
|
3110
3110
|
NEFCompression?: string;
|
|
3111
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
3111
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 46 bytes, use -b option to extract)" */
|
|
3112
3112
|
NEFLinearizationTable?: BinaryField | string;
|
|
3113
3113
|
/** ☆☆☆☆ Example: "Off (0 2)" */
|
|
3114
3114
|
NeutralDensityFilter?: string;
|
|
@@ -4497,8 +4497,8 @@ export interface XMPTags {
|
|
|
4497
4497
|
* devices (like iPhones) An example value, JSON stringified, follows the
|
|
4498
4498
|
* popularity ratings.
|
|
4499
4499
|
*
|
|
4500
|
-
* Autogenerated by "yarn mktags" by ExifTool 12.60 on
|
|
4501
|
-
*
|
|
4500
|
+
* Autogenerated by "yarn mktags" by ExifTool 12.60 on Wed Apr 12 2023.
|
|
4501
|
+
* 3054 unique tags were found in 10079 photo and video files.
|
|
4502
4502
|
*/
|
|
4503
4503
|
export interface Tags extends APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, ICCProfileTags, IPTCTags, JFIFTags, MPFTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, XMPTags {
|
|
4504
4504
|
errors?: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteTags.js","sourceRoot":"","sources":["../src/WriteTags.ts"],"names":[],"mappings":""}
|
package/dist/WriteTask.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { WriteTags } from "./ExifTool";
|
|
2
1
|
import { ExifToolTask } from "./ExifToolTask";
|
|
2
|
+
import { WriteTags } from "./WriteTags";
|
|
3
3
|
export declare function htmlEncode(s: string): string;
|
|
4
|
+
export declare const DefaultWriteTaskOptions: {
|
|
5
|
+
readonly useMWG: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type WriteTaskOptions = typeof DefaultWriteTaskOptions;
|
|
4
8
|
export declare class WriteTask extends ExifToolTask<void> {
|
|
5
9
|
readonly sourceFile: string;
|
|
6
10
|
readonly args: string[];
|
|
7
11
|
private constructor();
|
|
8
|
-
static for(filename: string, tags: WriteTags, extraArgs?: string[]): Promise<WriteTask | ExifToolTask<void>>;
|
|
12
|
+
static for(filename: string, tags: WriteTags, extraArgs?: string[], options?: Partial<WriteTaskOptions>): Promise<WriteTask | ExifToolTask<void>>;
|
|
9
13
|
toString(): string;
|
|
10
14
|
protected parse(data: string, error: Error): void;
|
|
11
15
|
}
|
package/dist/WriteTask.js
CHANGED
|
@@ -23,17 +23,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.WriteTask = exports.htmlEncode = void 0;
|
|
26
|
+
exports.WriteTask = exports.DefaultWriteTaskOptions = exports.htmlEncode = void 0;
|
|
27
27
|
const he_1 = require("he");
|
|
28
28
|
const _path = __importStar(require("path"));
|
|
29
29
|
const Array_1 = require("./Array");
|
|
30
30
|
const DateTime_1 = require("./DateTime");
|
|
31
|
+
const DefaultExifToolOptions_1 = require("./DefaultExifToolOptions");
|
|
31
32
|
const DeleteAllTagsArgs_1 = require("./DeleteAllTagsArgs");
|
|
32
33
|
const ExifToolTask_1 = require("./ExifToolTask");
|
|
33
34
|
const File_1 = require("./File");
|
|
34
35
|
const FilenameCharsetArgs_1 = require("./FilenameCharsetArgs");
|
|
35
36
|
const Number_1 = require("./Number");
|
|
36
37
|
const Object_1 = require("./Object");
|
|
38
|
+
const Pick_1 = require("./Pick");
|
|
37
39
|
const String_1 = require("./String");
|
|
38
40
|
const Struct_1 = require("./Struct");
|
|
39
41
|
const VersionTask_1 = require("./VersionTask");
|
|
@@ -81,14 +83,17 @@ function enc(o, structValue = false) {
|
|
|
81
83
|
throw new Error("cannot encode " + JSON.stringify(o));
|
|
82
84
|
}
|
|
83
85
|
}
|
|
86
|
+
exports.DefaultWriteTaskOptions = {
|
|
87
|
+
...(0, Pick_1.pick)(DefaultExifToolOptions_1.DefaultExifToolOptions, "useMWG"),
|
|
88
|
+
};
|
|
84
89
|
class WriteTask extends ExifToolTask_1.ExifToolTask {
|
|
85
90
|
constructor(sourceFile, args) {
|
|
86
91
|
super(args);
|
|
87
92
|
this.sourceFile = sourceFile;
|
|
88
93
|
this.args = args;
|
|
89
94
|
}
|
|
90
|
-
static async for(filename, tags, extraArgs = []) {
|
|
91
|
-
var _a, _b;
|
|
95
|
+
static async for(filename, tags, extraArgs = [], options) {
|
|
96
|
+
var _a, _b, _c;
|
|
92
97
|
const sourceFile = _path.resolve(filename);
|
|
93
98
|
const args = [
|
|
94
99
|
...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs,
|
|
@@ -96,6 +101,9 @@ class WriteTask extends ExifToolTask_1.ExifToolTask {
|
|
|
96
101
|
`${sep}`,
|
|
97
102
|
"-E", // < html encoding https://exiftool.org/faq.html#Q10
|
|
98
103
|
];
|
|
104
|
+
if ((_a = options === null || options === void 0 ? void 0 : options.useMWG) !== null && _a !== void 0 ? _a : exports.DefaultWriteTaskOptions.useMWG) {
|
|
105
|
+
args.push("-use", "MWG");
|
|
106
|
+
}
|
|
99
107
|
// ExifTool complains "Nothing to write" if the task will only remove values
|
|
100
108
|
// and the file is missing.
|
|
101
109
|
if ((extraArgs.length === 0 ||
|
|
@@ -110,10 +118,10 @@ class WriteTask extends ExifToolTask_1.ExifToolTask {
|
|
|
110
118
|
// https://exiftool.org/forum/index.php?topic=14488.0 and
|
|
111
119
|
// https://github.com/photostructure/exiftool-vendored.js/issues/131
|
|
112
120
|
if ((0, Number_1.isNumber)(tags.GPSLatitude)) {
|
|
113
|
-
(
|
|
121
|
+
(_b = tags.GPSLatitudeRef) !== null && _b !== void 0 ? _b : (tags.GPSLatitudeRef = tags.GPSLatitude >= 0 ? "N" : "S");
|
|
114
122
|
}
|
|
115
123
|
if ((0, Number_1.isNumber)(tags.GPSLongitude)) {
|
|
116
|
-
(
|
|
124
|
+
(_c = tags.GPSLongitudeRef) !== null && _c !== void 0 ? _c : (tags.GPSLongitudeRef = tags.GPSLongitude >= 0 ? "E" : "W");
|
|
117
125
|
}
|
|
118
126
|
for (const key of (0, Object_1.keys)(tags)) {
|
|
119
127
|
const val = tags[key];
|
package/dist/WriteTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WriteTask.js","sourceRoot":"","sources":["../src/WriteTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA6B;AAC7B,mCAAyC;AACzC,yCAAuD;AACvD,2DAAuD;
|
|
1
|
+
{"version":3,"file":"WriteTask.js","sourceRoot":"","sources":["../src/WriteTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA6B;AAC7B,mCAAyC;AACzC,yCAAuD;AACvD,qEAAiE;AACjE,2DAAuD;AACvD,iDAA6C;AAC7C,iCAAoC;AACpC,+DAA+D;AAE/D,qCAAmC;AACnC,qCAA+B;AAC/B,iCAA6B;AAC7B,qCAAmC;AACnC,qCAAmC;AACnC,+CAA2C;AAG3C,MAAM,SAAS,GAAG,qCAAqC,CAAA;AACvD,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA,CAAC,mBAAmB;AAEvD,+EAA+E;AAC/E,kBAAkB;AAClB,SAAgB,UAAU,CAAC,CAAS;IAClC,OAAO;IACL,wFAAwF;IACxF,IAAA,WAAM,EAAC,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;QACpD,qEAAqE;SACpE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC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