Options
All
  • Public
  • Public/Protected
  • All
Menu

exiftool-vendored

Index

Type aliases

WriteTags

WriteTags: object

Type declaration

Variables

Const DefaultExifToolOptions

DefaultExifToolOptions: Omit<ExifToolOptions, "processFactory"> = Object.freeze({...new bc.BatchClusterOptions(),maxProcs: DefaultMaxProcs,maxTasksPerProcess: 500,spawnTimeoutMillis: 30000,taskTimeoutMillis: 10000,onIdleIntervalMillis: 2000,taskRetries: 1,exiftoolPath: DefaultExifToolPath,exiftoolArgs: DefaultExiftoolArgs,pass: "{ready.*}",fail: "{ready.*}",exitCommand: "-stay_open\nFalse\n",versionCommand: new VersionTask().command,minorErrorsRegExp: DefaultMinorErrorsRegExp})

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 DefaultMinorErrorsRegExp

DefaultMinorErrorsRegExp: RegExp = /(\[minor\])|(warning: duplicate)/i

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

compact

  • compact<T>(array: (undefined | null | T)[]): T[]
  • Type parameters

    • T

    Parameters

    • array: (undefined | null | T)[]

    Returns T[]

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[]

leftPad

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

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

    Returns string

millisToFractionalPart

  • millisToFractionalPart(millis: number, precision?: number): string
  • Given a time value in milliseconds, return a decimal in seconds units, rounded to the given precision, without zero right or left padding.

    export

    Parameters

    • millis: number

      [0,1000)

    • Default value precision: number = 6

    Returns string

    the decimal fraction of the second (to maximally microsecond precision)

pad2

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

    • Rest ...numbers: number[]

    Returns string[]

pad3

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

    • Rest ...numbers: number[]

    Returns string[]

parse

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>

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[]

Generated using TypeDoc