Options
All
  • Public
  • Public/Protected
  • All
Menu

exiftool-vendored

Index

Type aliases

Maybe

Maybe: T | undefined

MaybeNull

MaybeNull: Maybe<T> | null

WriteTags

WriteTags: Partial<Tags & ShortcutTags>

Variables

Const DefaultExifToolOptions

DefaultExifToolOptions: Omit<ExifToolOptions, "processFactory"> = Object.freeze({...new bc.BatchClusterOptions(),maxProcs: DefaultMaxProcs,maxTasksPerProcess: 500,spawnTimeoutMillis: 30000,taskTimeoutMillis: 20000, // see https://github.com/mceachen/exiftool-vendored.js/issues/34onIdleIntervalMillis: 2000,taskRetries: 1,exiftoolPath: DefaultExifToolPath,exiftoolArgs: DefaultExiftoolArgs,pass: "{ready.*}",fail: "{ready.*}",exitCommand: "-stay_open\nFalse\n",versionCommand: new VersionTask().command,numericTags: ["Orientation", "*Duration*"]})

Default values for ExifToolOptions, except for processFactory (which is created by the ExifTool constructor)

Const DefaultExifToolPath

DefaultExifToolPath: string = findExiftool()

Const DefaultExiftoolArgs

DefaultExiftoolArgs: string[] = ["-stay_open", "True", "-@", "-"]

Const DefaultMaxProcs

DefaultMaxProcs: number = Math.max(1, Math.floor(_os.cpus().length / 4))

Const exiftool

exiftool: ExifTool = new ExifTool()

Use this singleton rather than instantiating new ExifTool instances in order to leverage a single running ExifTool process. As of v3.0, its maxProcs is set to the number of CPUs on the current system; no more than maxProcs instances of exiftool will be spawned. You may want to experiment with smaller or larger values for maxProcs, depending on CPU and disk speed of your system and performance tradeoffs.

Note that each child process consumes between 10 and 50 MB of RAM. If you have limited system resources you may want to use a smaller maxProcs value.

Functions

blank

  • blank(s: Maybe<string>): boolean

compact

extractOffset

  • Parse a timezone offset and return the offset minutes

    Parameters

    Returns Maybe<string>

extractTzOffsetFromTags

  • extractTzOffsetFromTags(t: object): Maybe<string>

filterInPlace

  • filterInPlace<T>(arr: T[], filter: function): T[]
  • Remove all elements from the given array that return false from the given predicate filter.

    Type parameters

    • T

    Parameters

    • arr: T[]
    • filter: function
        • (t: T): boolean
        • Parameters

          • t: T

          Returns boolean

    Returns T[]

first

  • first<T, U>(iter: Iterable<Maybe<T>>, f: function): Maybe<U>
  • Type parameters

    • T

    • U

    Parameters

    • iter: Iterable<Maybe<T>>
    • f: function
        • Parameters

          • t: T

          Returns Maybe<U>

    Returns Maybe<U>

isNumber

  • isNumber(n: any): boolean
  • Parameters

    • n: any

    Returns boolean

leftPad

  • leftPad(i: any, minLen: number, padChar: "0" | " "): string
  • Parameters

    • i: any
    • minLen: number
    • padChar: "0" | " "

    Returns string

map

  • Type parameters

    • T

    • U

    Parameters

    • maybeT: MaybeNull<T>
    • f: function
        • (t: T): U
        • Parameters

          • t: T

          Returns U

    Returns Maybe<U>

notBlank

  • notBlank(s: Maybe<string>): boolean

offsetMinutesToZoneName

  • offsetMinutesToZoneName(offsetMinutes: Maybe<number>): Maybe<string>
  • Returns a "zone name" (used by luxon) that encodes the given offset.

    Parameters

    • offsetMinutes: Maybe<number>

    Returns Maybe<string>

pad2

  • pad2(...numbers: number[]): string[]
  • Parameters

    • Rest ...numbers: number[]

    Returns string[]

pad3

  • pad3(...numbers: number[]): string[]
  • Parameters

    • Rest ...numbers: number[]

    Returns string[]

reasonableTzOffsetMinutes

  • reasonableTzOffsetMinutes(tzOffsetMinutes: Maybe<number>): boolean

retryOnReject

  • retryOnReject<T>(f: function, maxRetries: number): Promise<T>
  • Type parameters

    • T

    Parameters

    • f: function
        • (): T | Promise<T>
        • Returns T | Promise<T>

    • maxRetries: number

    Returns Promise<T>

stripPrefix

  • stripPrefix(s: string, prefix: string): string
  • Parameters

    • s: string
    • prefix: string

    Returns string

times

  • times<T>(n: number, f: function): T[]
  • Type parameters

    • T

    Parameters

    • n: number
    • f: function
        • (idx: number): T
        • Parameters

          • idx: number

          Returns T

    Returns T[]

toF

  • toF(n: any): Maybe<number>

toI

  • toI(n: any): Maybe<number>

toS

  • toS(s: Maybe<any>): string

uniq

  • uniq<T>(arr: T[]): T[]
  • Type parameters

    • T

    Parameters

    • arr: T[]

    Returns T[]

validDateTime

  • validDateTime(dt: DateTime): boolean
  • Parameters

    • dt: DateTime

    Returns boolean

Generated using TypeDoc