exiftool-vendored 32.1.0 → 33.1.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 +13 -0
- package/dist/CapturedAtTagNames.d.ts +1 -1
- package/dist/CapturedAtTagNames.js +0 -1
- package/dist/CapturedAtTagNames.js.map +1 -1
- package/dist/DefaultCreateDateTagNames.d.ts +1 -1
- package/dist/Equal.d.ts +1 -0
- package/dist/Equal.js +3 -0
- package/dist/Equal.js.map +1 -0
- package/dist/ExifToolVendoredTags.js.map +1 -1
- package/dist/Expect.d.ts +1 -0
- package/dist/Expect.js +3 -0
- package/dist/Expect.js.map +1 -0
- package/dist/GeolocationTags.d.ts +64 -12
- package/dist/GeolocationTags.js.map +1 -1
- package/dist/ICCProfileTags.d.ts +98 -9
- package/dist/ICCProfileTags.js.map +1 -1
- package/dist/IPTCApplicationRecordTags.d.ts +131 -3
- package/dist/IPTCApplicationRecordTags.js.map +1 -1
- package/dist/MWGTags.d.ts +77 -2
- package/dist/MWGTags.js.map +1 -1
- package/dist/StrEnum.d.ts +0 -2
- package/dist/StrEnum.js +4 -2
- package/dist/StrEnum.js.map +1 -1
- package/dist/Tags.d.ts +2061 -455
- package/dist/Tags.js +8 -8
- package/dist/Tags.js.map +1 -1
- package/eslint.config.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -35,6 +35,19 @@ vendored versions of ExifTool match the version that they vendor.
|
|
|
35
35
|
|
|
36
36
|
## History
|
|
37
37
|
|
|
38
|
+
### v33.1.0
|
|
39
|
+
|
|
40
|
+
- 🐞 Fixed `GPSTimeStamp` to be `ExifTime | string`
|
|
41
|
+
- 🐞 Removed `GPSPositionRef` (not a thing!)
|
|
42
|
+
|
|
43
|
+
### v33.0.0
|
|
44
|
+
|
|
45
|
+
- 🐞/💔 `SubSecMediaCreateDate` was removed from `CompositeTags` and `Tags`. It apparently never _was_ a thing, and, worse: I can't blame AI for hallucinating it, because I added it several years ago. Oops!
|
|
46
|
+
- ✨ `mktags` was enhanced to detect and avoid duplicate field definitions from included static interfaces.
|
|
47
|
+
- ✨ Increased MAX_TAGS from 2500 to 2700 to accommodate additional tags, so there's a bunch of new tags in there! Please open an issue if you see `error TS2590: Expression produces a union type that is too complex to represent` (please be sure to include a reproduction!)
|
|
48
|
+
- 📦 Added jsdocs to many, many fields.
|
|
49
|
+
- 🐞 `mktags` calculates `@frequency` correctly now (it was measuring "average occurrences per file across all groups" rather than "percentage of files containing this tag" -- this led to some tags having a frequency of 200% (!!))
|
|
50
|
+
|
|
38
51
|
### v32.1.0
|
|
39
52
|
|
|
40
53
|
- 🐞 Async `disposable` timeouts are now cancelled properly. Prior versions could prevent the process from exiting until the timeout elapsed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CapturedAtTagNames: readonly ["SubSecDateTimeOriginal", "SubSecCreateDate", "
|
|
1
|
+
export declare const CapturedAtTagNames: readonly ["SubSecDateTimeOriginal", "SubSecCreateDate", "DateTimeOriginal", "CreateDate", "MediaCreateDate", "CreationDate", "DateTimeCreated", "TimeCreated"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapturedAtTagNames.js","sourceRoot":"","sources":["../src/CapturedAtTagNames.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,kBAAkB;IAClB,
|
|
1
|
+
{"version":3,"file":"CapturedAtTagNames.js","sourceRoot":"","sources":["../src/CapturedAtTagNames.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,kBAAkB;IAClB,kBAAkB;IAClB,YAAY;IACZ,iBAAiB;IACjB,cAAc,EAAE,0CAA0C;IAC1D,iBAAiB;IACjB,aAAa,EAAE,0BAA0B;CACC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @deprecated use {@link CapturedAtTagNames} instead.
|
|
3
3
|
*/
|
|
4
|
-
export declare const DefaultCreateDateTagNames: readonly ["SubSecDateTimeOriginal", "SubSecCreateDate", "
|
|
4
|
+
export declare const DefaultCreateDateTagNames: readonly ["SubSecDateTimeOriginal", "SubSecCreateDate", "DateTimeOriginal", "CreateDate", "MediaCreateDate", "CreationDate", "DateTimeCreated", "TimeCreated"];
|
package/dist/Equal.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
|
package/dist/Equal.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Equal.js","sourceRoot":"","sources":["../src/Equal.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifToolVendoredTags.js","sourceRoot":"","sources":["../src/ExifToolVendoredTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExifToolVendoredTags.js","sourceRoot":"","sources":["../src/ExifToolVendoredTags.ts"],"names":[],"mappings":";;;AAGA,uCAA0D;AAkC7C,QAAA,wBAAwB,GAAG,IAAA,iBAAO,EAC7C,IAAI,EACJ,MAAM,EACN,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,UAAU,CACmC,CAAC"}
|
package/dist/Expect.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Expect<T extends true> = T;
|
package/dist/Expect.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expect.js","sourceRoot":"","sources":["../src/Expect.ts"],"names":[],"mappings":""}
|
|
@@ -6,38 +6,90 @@ import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
|
6
6
|
* @see https://exiftool.org/geolocation.html#Read
|
|
7
7
|
*/
|
|
8
8
|
export interface GeolocationTags {
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* ☆☆☆☆ ✔ Example: 99
|
|
11
|
+
*
|
|
12
|
+
* Compass bearing in degrees from the input GPS position to the returned
|
|
13
|
+
* city's coordinates. Only generated when GPS coordinates are provided as input.
|
|
14
|
+
*/
|
|
10
15
|
GeolocationBearing?: number;
|
|
11
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* ☆☆☆☆ ✔ Example: "Zürich"
|
|
18
|
+
*
|
|
19
|
+
* The name of the nearest city or populated place found in the geonames database.
|
|
20
|
+
* Note: The term "City" here may more aptly be called "Feature Name" since the
|
|
21
|
+
* database may include features which are not cities.
|
|
22
|
+
*/
|
|
12
23
|
GeolocationCity?: string;
|
|
13
24
|
/** ☆☆☆☆ ✔ Example: "United States" */
|
|
14
25
|
GeolocationCountry?: string;
|
|
15
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* ☆☆☆☆ ✔ Example: "US"
|
|
28
|
+
*
|
|
29
|
+
* Two-letter ISO country code for the location.
|
|
30
|
+
*/
|
|
16
31
|
GeolocationCountryCode?: string;
|
|
17
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* ☆☆☆☆ ✔ Example: "9.60 km"
|
|
34
|
+
*
|
|
35
|
+
* The distance in kilometers from the input GPS point to the GeolocationPosition
|
|
36
|
+
* of the returned city. Only generated when GPS coordinates are provided as input.
|
|
37
|
+
*/
|
|
18
38
|
GeolocationDistance?: string;
|
|
19
39
|
/**
|
|
20
40
|
* ☆☆☆☆ ✔ Example: "PPLL"
|
|
21
41
|
* @see http://www.geonames.org/export/codes.html#P
|
|
22
42
|
*/
|
|
23
43
|
GeolocationFeatureCode?: string;
|
|
24
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* ☆☆☆☆ ✔ Example: "Populated Place"
|
|
46
|
+
*
|
|
47
|
+
* Human-readable description of the GeolocationFeatureCode, such as
|
|
48
|
+
* "Populated Place" or "Seat Of A First-order Administrative Division".
|
|
49
|
+
*/
|
|
25
50
|
GeolocationFeatureType?: string;
|
|
26
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* ☆☆☆☆ ✔ Example: 95000
|
|
53
|
+
*
|
|
54
|
+
* Population of the identified city or feature, rounded to 2 significant digits.
|
|
55
|
+
* Based on geonames database entries for reference purposes.
|
|
56
|
+
*/
|
|
27
57
|
GeolocationPopulation?: number;
|
|
28
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* ☆☆☆☆ ✔ Example: "7.3397, 134.4733"
|
|
60
|
+
*
|
|
61
|
+
* Latitude and longitude coordinates of the identified city, formatted as
|
|
62
|
+
* "latitude, longitude" in decimal degrees.
|
|
63
|
+
*/
|
|
29
64
|
GeolocationPosition?: string;
|
|
30
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* ☆☆☆☆ ✔ Example: "Île-de-France"
|
|
67
|
+
*
|
|
68
|
+
* Administrative division corresponding to state or province in North America.
|
|
69
|
+
* Derived from the geonames database.
|
|
70
|
+
*/
|
|
31
71
|
GeolocationRegion?: string;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/** ☆☆☆☆ ✔ Example: "Pacific/Saipan"
|
|
72
|
+
/**
|
|
73
|
+
* ☆☆☆☆ ✔ Example: "Yokohama Shi"
|
|
35
74
|
*
|
|
36
|
-
*
|
|
75
|
+
* Secondary administrative division (typically county in North America).
|
|
76
|
+
* The meaning varies by country.
|
|
77
|
+
*/
|
|
78
|
+
GeolocationSubregion?: string;
|
|
79
|
+
/**
|
|
80
|
+
* IANA timezone name associated with the matched city location from the geonames database.
|
|
37
81
|
*
|
|
38
82
|
* @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
83
|
+
* @example "Pacific/Saipan"
|
|
39
84
|
*/
|
|
40
85
|
GeolocationTimeZone?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Warning messages related to geolocation processing, if any issues occur
|
|
88
|
+
* during lookup or if the geolocation data may be unreliable.
|
|
89
|
+
*
|
|
90
|
+
* Note: This tag is not documented in the official ExifTool geolocation
|
|
91
|
+
* documentation and may not be consistently returned.
|
|
92
|
+
*/
|
|
41
93
|
GeolocationWarning?: string;
|
|
42
94
|
}
|
|
43
95
|
export declare const GeolocationTagNames: StrEnum<"GeolocationBearing" | "GeolocationCity" | "GeolocationCountry" | "GeolocationCountryCode" | "GeolocationDistance" | "GeolocationFeatureCode" | "GeolocationFeatureType" | "GeolocationPopulation" | "GeolocationPosition" | "GeolocationRegion" | "GeolocationSubregion" | "GeolocationTimeZone" | "GeolocationWarning">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeolocationTags.js","sourceRoot":"","sources":["../src/GeolocationTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"GeolocationTags.js","sourceRoot":"","sources":["../src/GeolocationTags.ts"],"names":[],"mappings":";;;AAoHA,4CAEC;AApHD,uCAA0D;AAgG7C,QAAA,mBAAmB,GAAG,IAAA,iBAAO,EACxC,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,CACoB,CAAC;AAI3C,SAAgB,gBAAgB,CAAC,GAAW;IAC1C,OAAO,2BAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/ICCProfileTags.d.ts
CHANGED
|
@@ -5,23 +5,112 @@ import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
|
5
5
|
* None of these tags are writable.
|
|
6
6
|
*/
|
|
7
7
|
export interface ICCProfileTags {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The color space of the device associated with this ICC profile.
|
|
10
|
+
*
|
|
11
|
+
* Common values include "RGB ", "CMYK", "Gray", "Lab ", "XYZ ", and others.
|
|
12
|
+
* Note that color space names are often padded to 4 characters.
|
|
13
|
+
*
|
|
14
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
15
|
+
*
|
|
16
|
+
* ☆☆☆☆ ✔ Example: "RGB "
|
|
17
|
+
*/
|
|
9
18
|
ColorSpaceData?: string;
|
|
10
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* XYZ values of the illuminant of the Profile Connection Space (PCS).
|
|
21
|
+
*
|
|
22
|
+
* This is typically the D50 standard illuminant (0.9642, 1.0, 0.8249) used
|
|
23
|
+
* as the reference white point for ICC color transformations. The three
|
|
24
|
+
* numbers represent the X, Y, and Z tristimulus values.
|
|
25
|
+
*
|
|
26
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
27
|
+
*
|
|
28
|
+
* ☆☆☆☆ ✔ Example: "0.9642 1 0.82491"
|
|
29
|
+
*/
|
|
11
30
|
ConnectionSpaceIlluminant?: string;
|
|
12
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Physical characteristics of the device (reflective vs. transmissive,
|
|
33
|
+
* glossy vs. matte, positive vs. negative media, color vs. black-and-white).
|
|
34
|
+
*
|
|
35
|
+
* These attributes help color management systems understand the nature of
|
|
36
|
+
* the device and apply appropriate color transformations.
|
|
37
|
+
*
|
|
38
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
39
|
+
*
|
|
40
|
+
* ☆☆☆☆ ✔ Example: "Reflective, Glossy, Positive, Color"
|
|
41
|
+
*/
|
|
13
42
|
DeviceAttributes?: string;
|
|
14
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Manufacturer signature code identifying the device manufacturer.
|
|
45
|
+
*
|
|
46
|
+
* This is typically a 4-character code registered with the ICC, or "none"
|
|
47
|
+
* for generic profiles. Common manufacturers include Adobe, Apple, Canon,
|
|
48
|
+
* Nikon, and others.
|
|
49
|
+
*
|
|
50
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
51
|
+
*
|
|
52
|
+
* ☆☆☆☆ ✔ Example: "none"
|
|
53
|
+
*/
|
|
15
54
|
DeviceManufacturer?: string;
|
|
16
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Human-readable description of the device manufacturer.
|
|
57
|
+
*
|
|
58
|
+
* This provides a full text description of the manufacturer, often
|
|
59
|
+
* including URLs or additional contact information, complementing the
|
|
60
|
+
* 4-character DeviceManufacturer signature code.
|
|
61
|
+
*
|
|
62
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
63
|
+
*
|
|
64
|
+
* ☆☆☆☆ ✔ Example: "IEC http://www.iec.ch"
|
|
65
|
+
*/
|
|
17
66
|
DeviceMfgDesc?: string;
|
|
18
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Device model signature code.
|
|
69
|
+
*
|
|
70
|
+
* This is typically a 4-character code or short identifier that specifies
|
|
71
|
+
* the particular device model. Works in conjunction with DeviceManufacturer
|
|
72
|
+
* for complete device identification.
|
|
73
|
+
*
|
|
74
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
75
|
+
*
|
|
76
|
+
* ☆☆☆☆ ✔ Example: "sRGB"
|
|
77
|
+
*/
|
|
19
78
|
DeviceModel?: string;
|
|
20
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Human-readable description of the device model.
|
|
81
|
+
*
|
|
82
|
+
* This provides a full text description of the device model, complementing
|
|
83
|
+
* the shorter DeviceModel field with more detailed information such as
|
|
84
|
+
* version numbers and manufacturer names.
|
|
85
|
+
*
|
|
86
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
87
|
+
*
|
|
88
|
+
* ☆☆☆☆ ✔ Example: "sRGB v1.31 (Canon)"
|
|
89
|
+
*/
|
|
21
90
|
DeviceModelDesc?: string;
|
|
22
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Absolute luminance of emissive devices in XYZ tristimulus coordinates.
|
|
93
|
+
*
|
|
94
|
+
* The three numbers represent X, Y, and Z values, where the Y component
|
|
95
|
+
* directly corresponds to the luminance in cd/m² as defined by CIE
|
|
96
|
+
* absolute colorimetry.
|
|
97
|
+
*
|
|
98
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
99
|
+
*
|
|
100
|
+
* ☆☆☆☆ ✔ Example: "76.03647 80 87.12462"
|
|
101
|
+
*/
|
|
23
102
|
Luminance?: string;
|
|
24
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Human-readable description of the ICC profile.
|
|
105
|
+
*
|
|
106
|
+
* This is the primary name and description of the color profile, typically
|
|
107
|
+
* including the profile name, version, and sometimes the intended use case
|
|
108
|
+
* or device it was created for.
|
|
109
|
+
*
|
|
110
|
+
* @see https://exiftool.org/TagNames/ICC_Profile.html
|
|
111
|
+
*
|
|
112
|
+
* ☆☆☆☆ ✔ Example: "sRGB v1.31 (Canon)"
|
|
113
|
+
*/
|
|
25
114
|
ProfileDescription?: string;
|
|
26
115
|
}
|
|
27
116
|
export declare const ICCProfileTagNames: StrEnum<"ColorSpaceData" | "ConnectionSpaceIlluminant" | "DeviceAttributes" | "DeviceManufacturer" | "DeviceMfgDesc" | "DeviceModel" | "DeviceModelDesc" | "Luminance" | "ProfileDescription">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICCProfileTags.js","sourceRoot":"","sources":["../src/ICCProfileTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ICCProfileTags.js","sourceRoot":"","sources":["../src/ICCProfileTags.ts"],"names":[],"mappings":";;;AAEA,uCAA0D;AA6H7C,QAAA,kBAAkB,GAAG,IAAA,iBAAO,EACvC,gBAAgB,EAChB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,oBAAoB,CACmB,CAAC"}
|
|
@@ -20,51 +20,179 @@ export interface IPTCApplicationRecordTags {
|
|
|
20
20
|
EditStatus?: string;
|
|
21
21
|
EditorialUpDate?: ExifDateTime | ExifDate;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Editorial urgency rating (1-9 scale, deprecated).
|
|
24
|
+
*
|
|
25
|
+
* @remarks Valid values: '1' (Highest), '2'-'4', '5' (Normal), '6'-'7', '8' (Lowest), '9' (User defined).
|
|
26
|
+
* Note: This field was deprecated when IPTC Core 1.0 was released in 2005.
|
|
24
27
|
*/
|
|
25
28
|
Urgency?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Structured subject classification reference (13-236+ characters).
|
|
31
|
+
*
|
|
32
|
+
* @remarks Used for formal subject taxonomies and classification systems.
|
|
33
|
+
*/
|
|
26
34
|
SubjectReference?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Content category code.
|
|
37
|
+
*
|
|
38
|
+
* @remarks Max 3 characters. Single category code for primary content classification.
|
|
39
|
+
* Note: This field was deprecated when IPTC Core 1.0 was released in 2005.
|
|
40
|
+
*/
|
|
27
41
|
Category?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Additional category assignments for the content.
|
|
44
|
+
*
|
|
45
|
+
* @remarks Max 32 characters per entry, repeatable. Supplements the primary Category field.
|
|
46
|
+
* Note: This field was deprecated when IPTC Core 1.0 was released in 2005.
|
|
47
|
+
*/
|
|
28
48
|
SupplementalCategories?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Identifier for recurring or regularly updated content (e.g., "Daily Market Report").
|
|
51
|
+
*
|
|
52
|
+
* @remarks Max 32 characters. Used to identify content that appears repeatedly or is part of a series.
|
|
53
|
+
*/
|
|
29
54
|
FixtureIdentifier?: string;
|
|
30
55
|
ContentLocationCode?: string;
|
|
31
56
|
ContentLocationName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Date when the content is eligible for publication (format: YYYYMMDD).
|
|
59
|
+
*/
|
|
32
60
|
ReleaseDate?: ExifDateTime | ExifDate;
|
|
61
|
+
/**
|
|
62
|
+
* Time when the content is eligible for publication (includes timezone offset).
|
|
63
|
+
*/
|
|
33
64
|
ReleaseTime?: ExifDateTime | ExifTime;
|
|
65
|
+
/**
|
|
66
|
+
* Date when the content validity expires (format: YYYYMMDD).
|
|
67
|
+
*/
|
|
34
68
|
ExpirationDate?: ExifDateTime | ExifDate;
|
|
69
|
+
/**
|
|
70
|
+
* Time when the content validity expires (includes timezone offset).
|
|
71
|
+
*/
|
|
35
72
|
ExpirationTime?: string | ExifDateTime | ExifTime;
|
|
73
|
+
/**
|
|
74
|
+
* Editorial handling or usage instructions for the image.
|
|
75
|
+
*
|
|
76
|
+
* @remarks Max 256 characters. Used for special directives about how the content should be used or handled.
|
|
77
|
+
*/
|
|
36
78
|
SpecialInstructions?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Action required for this content.
|
|
81
|
+
*
|
|
82
|
+
* @remarks Valid values: 01 (Kill/delete), 02 (Replace with new version), 03 (Append to existing), 04 (Reference only)
|
|
83
|
+
*/
|
|
37
84
|
ActionAdvised?: number;
|
|
38
85
|
ReferenceService?: string;
|
|
39
86
|
ReferenceDate?: ExifDateTime | ExifDate;
|
|
40
87
|
ReferenceNumber?: number;
|
|
41
88
|
OriginatingProgram?: string;
|
|
42
89
|
ProgramVersion?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Publication cycle timing.
|
|
92
|
+
*
|
|
93
|
+
* @remarks Valid values: 'a' (morning), 'b' (both morning and evening), 'p' (evening)
|
|
94
|
+
*/
|
|
43
95
|
ObjectCycle?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Creator or photographer name (e.g., "John Smith").
|
|
98
|
+
*
|
|
99
|
+
* @remarks Despite the hyphenated name, this is the standard field for crediting the image creator. Max 32 characters per entry, repeatable.
|
|
100
|
+
*/
|
|
44
101
|
"By-line"?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Creator's professional title (e.g., "Staff Photographer", "Freelance Journalist").
|
|
104
|
+
*
|
|
105
|
+
* @remarks Max 32 characters per entry, repeatable.
|
|
106
|
+
*/
|
|
45
107
|
"By-lineTitle"?: string;
|
|
46
108
|
City?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Location details within a city (e.g., "Central Park", "Brooklyn Bridge", "Building 5").
|
|
111
|
+
*
|
|
112
|
+
* @remarks Max 32 characters. Use for specific locations more granular than city level.
|
|
113
|
+
*/
|
|
47
114
|
"Sub-location"?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Province, state, or administrative region name (e.g., "California", "Ontario", "Bavaria").
|
|
117
|
+
*
|
|
118
|
+
* @remarks Max 32 characters.
|
|
119
|
+
*/
|
|
48
120
|
"Province-State"?: string;
|
|
121
|
+
/**
|
|
122
|
+
* ISO 3166 country code (typically 3-character alpha-3 format like "USA", "GBR", "JPN").
|
|
123
|
+
*
|
|
124
|
+
* @remarks The field expects 3-character codes per IPTC IIM specification, though ISO 3166 also defines 2-character alpha-2 codes.
|
|
125
|
+
*/
|
|
49
126
|
"Country-PrimaryLocationCode"?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Full country name (e.g., "United States", "United Kingdom", "Japan").
|
|
129
|
+
*
|
|
130
|
+
* @remarks Max 64 characters.
|
|
131
|
+
*/
|
|
50
132
|
"Country-PrimaryLocationName"?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Originally for transmission reference, now commonly used as a job identifier or assignment code.
|
|
135
|
+
*
|
|
136
|
+
* @remarks Max 32 characters.
|
|
137
|
+
*/
|
|
51
138
|
OriginalTransmissionReference?: string;
|
|
52
139
|
Headline?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Provider or agency that supplied the image (e.g., "Associated Press", "Getty Images").
|
|
142
|
+
*
|
|
143
|
+
* @remarks Max 32 characters. Acknowledges the source provider.
|
|
144
|
+
*/
|
|
53
145
|
Credit?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Original owner or source of the image (e.g., "Reuters", "NASA").
|
|
148
|
+
*
|
|
149
|
+
* @remarks Max 32 characters. Indicates the originating source, distinct from the provider.
|
|
150
|
+
*/
|
|
54
151
|
Source?: string;
|
|
55
152
|
CopyrightNotice?: string;
|
|
56
153
|
Contact?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Detailed description or caption of the image content.
|
|
156
|
+
*
|
|
157
|
+
* @remarks Max 2000 characters. Despite the hyphenated name, this is the standard field for comprehensive image descriptions.
|
|
158
|
+
*/
|
|
57
159
|
"Caption-Abstract"?: string;
|
|
58
160
|
LocalCaption?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Caption writer or editor name (e.g., "Jane Doe").
|
|
163
|
+
*
|
|
164
|
+
* @remarks Max 32 characters per entry, repeatable. Credits the person who wrote or edited the caption, not the photographer.
|
|
165
|
+
*/
|
|
59
166
|
"Writer-Editor"?: string;
|
|
60
167
|
ImageType?: string;
|
|
61
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* Image orientation.
|
|
170
|
+
*
|
|
171
|
+
* @remarks Valid values: 'L' (Landscape), 'P' (Portrait), 'S' (Square)
|
|
172
|
+
*/
|
|
62
173
|
ImageOrientation?: string;
|
|
63
174
|
LanguageIdentifier?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Audio format type (2 characters indicating mono/stereo with content type).
|
|
177
|
+
*/
|
|
64
178
|
AudioType?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Audio sampling frequency in Hz (6 digits).
|
|
181
|
+
*/
|
|
65
182
|
AudioSamplingRate?: number;
|
|
183
|
+
/**
|
|
184
|
+
* Audio bit resolution (2 digits, e.g., 16 for 16-bit audio).
|
|
185
|
+
*/
|
|
66
186
|
AudioSamplingResolution?: number;
|
|
187
|
+
/**
|
|
188
|
+
* Audio length in HHMMSS format (6 digits).
|
|
189
|
+
*/
|
|
67
190
|
AudioDuration?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Ending audio identifier or outcue text.
|
|
193
|
+
*
|
|
194
|
+
* @remarks Max 64 characters. Identifies what audio ends with, useful for broadcast synchronization.
|
|
195
|
+
*/
|
|
68
196
|
AudioOutcue?: string;
|
|
69
197
|
JobID?: string;
|
|
70
198
|
MasterDocumentID?: string;
|
|
@@ -80,5 +208,5 @@ export interface IPTCApplicationRecordTags {
|
|
|
80
208
|
DocumentHistory?: string;
|
|
81
209
|
ExifCameraInfo?: string;
|
|
82
210
|
}
|
|
83
|
-
export declare const IPTCApplicationRecordTagNames: StrEnum<"
|
|
211
|
+
export declare const IPTCApplicationRecordTagNames: StrEnum<"ApplicationRecordVersion" | "ObjectTypeReference" | "ObjectAttributeReference" | "ObjectName" | "EditStatus" | "EditorialUpDate" | "Urgency" | "SubjectReference" | "Category" | "SupplementalCategories" | "FixtureIdentifier" | "ContentLocationCode" | "ContentLocationName" | "ReleaseDate" | "ReleaseTime" | "ExpirationDate" | "ExpirationTime" | "SpecialInstructions" | "ActionAdvised" | "ReferenceService" | "ReferenceDate" | "ReferenceNumber" | "OriginatingProgram" | "ProgramVersion" | "ObjectCycle" | "By-line" | "By-lineTitle" | "City" | "Sub-location" | "Province-State" | "Country-PrimaryLocationCode" | "Country-PrimaryLocationName" | "OriginalTransmissionReference" | "Headline" | "Credit" | "Source" | "CopyrightNotice" | "Contact" | "Caption-Abstract" | "LocalCaption" | "Writer-Editor" | "ImageType" | "ImageOrientation" | "LanguageIdentifier" | "AudioType" | "AudioSamplingRate" | "AudioSamplingResolution" | "AudioDuration" | "AudioOutcue" | "JobID" | "MasterDocumentID" | "ShortDocumentID" | "UniqueDocumentID" | "OwnerID" | "ObjectPreviewFileFormat" | "ObjectPreviewFileVersion" | "Prefs" | "ClassifyState" | "SimilarityIndex" | "DocumentNotes" | "DocumentHistory" | "ExifCameraInfo">;
|
|
84
212
|
export type IPTCApplicationRecordTagName = StrEnumKeys<typeof IPTCApplicationRecordTagNames>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPTCApplicationRecordTags.js","sourceRoot":"","sources":["../src/IPTCApplicationRecordTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"IPTCApplicationRecordTags.js","sourceRoot":"","sources":["../src/IPTCApplicationRecordTags.ts"],"names":[],"mappings":";;;AAKA,uCAA0D;AAiN7C,QAAA,6BAA6B,GAAG,IAAA,iBAAO,EAClD,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,cAAc,EACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,OAAO,EACP,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,CACkC,CAAC"}
|
package/dist/MWGTags.d.ts
CHANGED
|
@@ -1,32 +1,107 @@
|
|
|
1
1
|
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
2
|
+
/**
|
|
3
|
+
* Root structure for MWG hierarchical keyword metadata.
|
|
4
|
+
*
|
|
5
|
+
* Contains the top-level hierarchy of keyword structures organized in a tree format.
|
|
6
|
+
*/
|
|
2
7
|
export interface KeywordInfoStruct {
|
|
8
|
+
/**
|
|
9
|
+
* Array of keyword structures representing the top level of the keyword hierarchy.
|
|
10
|
+
*/
|
|
3
11
|
Hierarchy?: KeywordStruct[];
|
|
4
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Individual keyword node in a hierarchical keyword tree.
|
|
15
|
+
*
|
|
16
|
+
* The MWG standard supports unlimited nesting depth, but ExifTool limits
|
|
17
|
+
* extraction to 6 levels to prevent infinite recursion.
|
|
18
|
+
* Example: "Nature > Animals > Mammals > Dogs".
|
|
19
|
+
*/
|
|
5
20
|
export interface KeywordStruct {
|
|
21
|
+
/**
|
|
22
|
+
* Array of nested keyword structures representing child keywords in the hierarchy.
|
|
23
|
+
*
|
|
24
|
+
* Enables multi-level keyword organization by recursively containing additional KeywordStruct entries.
|
|
25
|
+
*/
|
|
6
26
|
Children?: KeywordStruct[];
|
|
27
|
+
/**
|
|
28
|
+
* The keyword text value for this node in the hierarchy.
|
|
29
|
+
*
|
|
30
|
+
* This is the actual keyword string that appears at this level.
|
|
31
|
+
*/
|
|
7
32
|
Keyword: string;
|
|
33
|
+
/**
|
|
34
|
+
* Indicates whether this keyword has been applied/activated in the image metadata.
|
|
35
|
+
*/
|
|
36
|
+
Applied?: boolean;
|
|
8
37
|
}
|
|
9
38
|
/**
|
|
39
|
+
* MWG (Metadata Working Group) Keywords tags for standardized hierarchical keyword metadata.
|
|
40
|
+
*
|
|
41
|
+
* These tags enable consistent keyword organization across different metadata formats (XMP, IPTC, EXIF).
|
|
42
|
+
* ExifTool extracts hierarchical keywords up to 6 levels deep to avoid infinite recursion.
|
|
43
|
+
*
|
|
10
44
|
* Note: this is a partial interface: ExifTool extracts more fields from this
|
|
11
45
|
* group type (but I haven't seen those in the wild).
|
|
12
46
|
*
|
|
13
47
|
* @see https://exiftool.org/TagNames/MWG.html#Keywords
|
|
14
48
|
*/
|
|
15
49
|
export interface MWGKeywordTags {
|
|
50
|
+
/**
|
|
51
|
+
* Array of structured hierarchical keyword information.
|
|
52
|
+
*
|
|
53
|
+
* Each entry contains a Hierarchy field with nested KeywordStruct objects representing
|
|
54
|
+
* the complete keyword tree. This is the primary field for accessing full keyword hierarchies.
|
|
55
|
+
*/
|
|
16
56
|
KeywordInfo?: KeywordInfoStruct[];
|
|
57
|
+
/**
|
|
58
|
+
* Direct array of hierarchical keyword structures.
|
|
59
|
+
*
|
|
60
|
+
* Alternative representation providing direct access to keyword tree nodes without
|
|
61
|
+
* the KeywordInfo wrapper. Supports multi-level keyword organization with recursive Children fields.
|
|
62
|
+
*/
|
|
17
63
|
HierarchicalKeywords?: KeywordStruct[];
|
|
18
64
|
}
|
|
65
|
+
export declare const MWGKeywordTagNames: StrEnum<"KeywordInfo" | "HierarchicalKeywords">;
|
|
66
|
+
export type MWGKeywordTagName = StrEnumKeys<typeof MWGKeywordTagNames>;
|
|
67
|
+
/**
|
|
68
|
+
* Information about a single collection that groups related images.
|
|
69
|
+
*
|
|
70
|
+
* Collections enable organizing images into named groups (e.g., "Summer Vacation 2024", "Portfolio Selections").
|
|
71
|
+
* The MWG standard uses both a human-readable name and a unique identifier for each collection.
|
|
72
|
+
*/
|
|
19
73
|
export interface CollectionInfo {
|
|
74
|
+
/**
|
|
75
|
+
* Human-readable display name for the collection.
|
|
76
|
+
*
|
|
77
|
+
* This is the name users see when browsing collections (e.g., "Best Photos 2024").
|
|
78
|
+
*/
|
|
20
79
|
CollectionName: string;
|
|
80
|
+
/**
|
|
81
|
+
* Unique identifier (URI) for the collection.
|
|
82
|
+
*
|
|
83
|
+
* Provides a globally unique reference to distinguish between collections with the same name.
|
|
84
|
+
* Typically formatted as a URI or UUID to ensure uniqueness across different systems.
|
|
85
|
+
*/
|
|
21
86
|
CollectionURI: string;
|
|
22
87
|
}
|
|
23
88
|
/**
|
|
89
|
+
* MWG (Metadata Working Group) Collections tags for standardized image grouping metadata.
|
|
90
|
+
*
|
|
91
|
+
* Collections allow images to be organized into named groups while maintaining their physical location.
|
|
92
|
+
* This provides a standardized way to group related images across different metadata formats (XMP, IPTC, EXIF).
|
|
93
|
+
*
|
|
24
94
|
* @see https://exiftool.org/TagNames/MWG.html#Collections
|
|
25
95
|
*/
|
|
26
96
|
export interface MWGCollectionsTags {
|
|
97
|
+
/**
|
|
98
|
+
* Array of collections that include this image.
|
|
99
|
+
*
|
|
100
|
+
* An image can belong to multiple collections. Each collection is identified by both a
|
|
101
|
+
* human-readable name and a unique URI, enabling consistent collection management across
|
|
102
|
+
* different applications and systems.
|
|
103
|
+
*/
|
|
27
104
|
Collections?: CollectionInfo[];
|
|
28
105
|
}
|
|
29
|
-
export declare const MWGKeywordTagNames: StrEnum<"KeywordInfo" | "HierarchicalKeywords">;
|
|
30
|
-
export type MWGKeywordTagName = StrEnumKeys<typeof MWGKeywordTagNames>;
|
|
31
106
|
export declare const MWGCollectionsTagNames: StrEnum<"Collections">;
|
|
32
107
|
export type MWGCollectionsTagName = StrEnumKeys<typeof MWGCollectionsTagNames>;
|
package/dist/MWGTags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MWGTags.js","sourceRoot":"","sources":["../src/MWGTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MWGTags.js","sourceRoot":"","sources":["../src/MWGTags.ts"],"names":[],"mappings":";;;AAEA,uCAA0D;AAyE7C,QAAA,kBAAkB,GAAG,IAAA,iBAAO,EACvC,aAAa,EACb,sBAAsB,CACiB,CAAC;AAkD7B,QAAA,sBAAsB,GAAG,IAAA,iBAAO,EAAC,aAAa,CAE1D,CAAC"}
|
package/dist/StrEnum.d.ts
CHANGED
|
@@ -171,5 +171,3 @@ export type StrEnumHelpers<T extends string> = {
|
|
|
171
171
|
export type StrEnum<T extends string> = StrEnumType<T> & StrEnumHelpers<T>;
|
|
172
172
|
export type StrEnumKeys<Type> = Type extends StrEnum<infer X> ? X : never;
|
|
173
173
|
export declare function strEnum<T extends string>(...o: T[]): StrEnum<T>;
|
|
174
|
-
export declare const Directions: StrEnum<"North" | "South" | "East" | "West">;
|
|
175
|
-
export type Direction = StrEnumKeys<typeof Directions>;
|
package/dist/StrEnum.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Directions = void 0;
|
|
4
3
|
exports.strEnum = strEnum;
|
|
5
4
|
function lessThan(a, b) {
|
|
6
5
|
return a == null || b == null ? false : a < b;
|
|
@@ -71,5 +70,8 @@ function strEnum(...o) {
|
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
72
|
// Example usage:
|
|
74
|
-
|
|
73
|
+
// export const Directions = strEnum("North", "South", "East", "West");
|
|
74
|
+
// export type Direction = StrEnumKeys<typeof Directions>;
|
|
75
|
+
// assert the strEnum exactly matches the field names of an interface:
|
|
76
|
+
// declare const _: Expect<Equal<Direction, keyof DirectionInterface>>
|
|
75
77
|
//# sourceMappingURL=StrEnum.js.map
|