Skip to content

Commit

Permalink
force-add File*Date to Tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Mar 28, 2024
1 parent 22596e1 commit e94a6f7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ vendored versions of ExifTool match the version that they vendor.

- 📦 Expose `GeolocationTags` and `isGeolocationTag()`

- 📦 Add `FileTags.FileCreateDate` (only a thing on Windows)

### v25.0.0

- 🌱/✨ ExifTool upgraded to [v12.80](https://exiftool.org/history.html#v12.80), which **adds support for reverse-geo lookups** and [several other geolocation features](https://exiftool.org/geolocation.html
Expand Down
1 change: 1 addition & 0 deletions src/FileTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const FileTagNames = keysOf<FileTags>({
EncodingProcess: true,
ExifByteOrder: true,
FileAccessDate: true,
FileCreateDate: true,
FileInodeChangeDate: true,
FileModifyDate: true,
FileName: true,
Expand Down
26 changes: 14 additions & 12 deletions src/Tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export interface FileTags {
ExifByteOrder?: string
/** ★★★★ ✔ Example: "2024:03:28 11:39:10-07:00" */
FileAccessDate?: ExifDateTime | string
/** ☆☆☆☆ Example: */
FileCreateDate?: ExifDateTime | string
/** ★★★★ ✔ Example: "2024:03:20 21:17:00-07:00" */
FileInodeChangeDate?: ExifDateTime | string
/** ★★★★ ✔ Example: "2023:07:19 21:21:02-07:00" */
Expand Down Expand Up @@ -189,16 +191,14 @@ export interface APP1Tags {
CreatorSoftware?: string
/** ☆☆☆☆ Example: "2013:03:12 16:31:26" */
DateTimeGenerated?: ExifDateTime | string
/** ☆☆☆☆ Example: "(Binary data 1998654 bytes, use -b option to extract)" */
/** ☆☆☆☆ Example: "(Binary data 1011393 bytes, use -b option to extract)" */
EmbeddedImage?: BinaryField | string
/** ☆☆☆☆ Example: 960 */
EmbeddedImageHeight?: number
/** ☆☆☆☆ Example: "PNG" */
EmbeddedImageType?: string
/** ☆☆☆☆ Example: 640 */
EmbeddedImageWidth?: number
/** ☆☆☆☆ Example: 1 */
Emissivity?: number
/** ☆☆☆☆ Example: "46.1 deg" */
FieldOfView?: string
/** ☆☆☆☆ Example: "NOF" */
Expand Down Expand Up @@ -261,7 +261,7 @@ export interface APP1Tags {
PaletteStretch?: number
/** ☆☆☆☆ Example: ".basicImgData.objectParams.emissivity" */
Param0?: string
/** ☆☆☆☆ Example: "(Binary data 153804 bytes, use -b option to extract)" */
/** ☆☆☆☆ Example: "(Binary data 614604 bytes, use -b option to extract)" */
RawThermalImage?: BinaryField | string
/** ☆☆☆☆ Example: 90 */
RawThermalImageHeight?: number
Expand All @@ -281,8 +281,6 @@ export interface APP1Tags {
Real2IR?: number
/** ☆☆☆☆ Example: "26.7 C" */
ReflectedApparentTemperature?: string
/** ☆☆☆☆ Example: "80.0 %" */
RelativeHumidity?: string
/** ☆☆☆☆ Example: "41 110 240" */
UnderflowColor?: string
}
Expand Down Expand Up @@ -446,6 +444,10 @@ export interface APP14Tags {
export interface APP4Tags {
/** ☆☆☆☆ ✔ Example: "40 C" */
AmbientTemperature?: string
/** ☆☆☆☆ Example: 1 */
Emissivity?: number
/** ☆☆☆☆ Example: "80.0 %" */
RelativeHumidity?: string
}

export interface APP5Tags {
Expand Down Expand Up @@ -639,7 +641,7 @@ export interface EXIFTags {
InteropIndex?: string
/** ★★★★ ✔ Example: "undef undef undef" */
InteropVersion?: string
/** ☆☆☆☆ ✔ Example: "(Binary data 687616 bytes, use -b option to extract)" */
/** ☆☆☆☆ ✔ Example: "(Binary data 571392 bytes, use -b option to extract)" */
JpgFromRaw?: BinaryField
/** ☆☆☆☆ ✔ Example: 845574 */
JpgFromRawLength?: number
Expand Down Expand Up @@ -878,7 +880,7 @@ export interface APP6Tags {
* @see https://exiftool.org/TagNames/FlashPix.html
*/
export interface FlashPixTags {
/** ☆☆☆☆ Example: "(Binary data 20796 bytes, use -b option to extract)" */
/** ☆☆☆☆ Example: "(Binary data 18 bytes, use -b option to extract)" */
AudioStream?: BinaryField | string
/** ☆☆☆☆ ✔ Example: "Unicode UTF-16, little endian" */
CodePage?: string
Expand Down Expand Up @@ -2221,7 +2223,7 @@ export interface MakerNotesTags {
DSPFirmwareVersion?: string
/** ☆☆☆☆ ✔ Example: "Yes" */
DarkFocusEnvironment?: string
/** ★★☆☆ ✔ Example: "(Binary data 280 bytes, use -b option to extract)" */
/** ★★☆☆ ✔ Example: "(Binary data 114 bytes, use -b option to extract)" */
DataDump?: BinaryField | string
/** ☆☆☆☆ ✔ Example: 8289 */
DataScaling?: number
Expand Down Expand Up @@ -4339,7 +4341,7 @@ export interface MakerNotesTags {
ToneCurve?: string
/** ☆☆☆☆ ✔ Example: "(Binary data 95 bytes, use -b option to extract)" */
ToneCurveMatching?: BinaryField | string
/** ☆☆☆☆ ✔ Example: "(Binary data 1505 bytes, use -b option to extract)" */
/** ☆☆☆☆ ✔ Example: "(Binary data 1679 bytes, use -b option to extract)" */
ToneCurveTable?: BinaryField | string
/** ☆☆☆☆ ✔ Example: "Highlights; 0; -7; 7; Shadows; 0; -7; 7; Midtones; 0; -7;…0; 0; 0" */
ToneLevel?: string
Expand Down Expand Up @@ -4503,7 +4505,7 @@ export interface MakerNotesTags {
WhiteBalanceSetting?: string
/** ☆☆☆☆ ✔ Example: "Auto" */
WhiteBalanceSetup?: string
/** ☆☆☆☆ ✔ Example: "(Binary data 2201 bytes, use -b option to extract)" */
/** ☆☆☆☆ ✔ Example: "(Binary data 2217 bytes, use -b option to extract)" */
WhiteBalanceTable?: BinaryField | string
/** ☆☆☆☆ ✔ Example: "Auto" */
WhiteBalanceTemperature?: string
Expand Down Expand Up @@ -5120,7 +5122,7 @@ export interface XMPTags {
* popularity ratings.
*
* Autogenerated by "yarn mktags" by ExifTool 12.80 on Thu Mar 28 2024.
* 2735 unique tags were found in 10096 photo and video files.
* 2736 unique tags were found in 10096 photo and video files.
*/
export interface Tags
extends APP12Tags,
Expand Down
4 changes: 4 additions & 0 deletions src/update/mktags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ const RequiredTags: Record<string, { t: string; grp: string; value?: any }> = {
FileName: { t: "string", grp: "File" },
FileSize: { t: "string", grp: "File" },
FileType: { t: "string", grp: "File" },
FileAccessDate: { t: "ExifDateTime | string", grp: "File" },
FileCreateDate: { t: "ExifDateTime | string", grp: "File" },
FileModifyDate: { t: "ExifDateTime | string", grp: "File" },
FileInodeChangeDate: { t: "ExifDateTime | string", grp: "File" },
FileTypeExtension: { t: "string", grp: "File" },
FNumber: { t: "number", grp: "EXIF" },
Fnumber: { t: "string", grp: "APP12" },
Expand Down

0 comments on commit e94a6f7

Please sign in to comment.