google-photos-migrate
Version:
A tool to fix EXIF data and recover filenames from a Google Photos takeout.
42 lines (41 loc) • 1.24 kB
JavaScript
import { array, flag, multioption, number, option, positional, string, } from 'cmd-ts';
export const commonArgs = {
errorDir: positional({
type: string,
displayName: 'error_dir',
description: 'Failed media will be saved here.',
}),
force: flag({
short: 'f',
long: 'force',
description: "Forces the operation if the given directories aren't empty.",
}),
timeout: option({
type: number,
defaultValue: () => 30000,
short: 't',
long: 'timeout',
description: 'Sets the task timeout in milliseconds that will be passed to ExifTool.',
}),
skipCorrections: flag({
long: 'skip-corrections',
description: 'Skips renaming wrong extensions identified by ExifTool.',
}),
verbose: flag({
short: 'v',
long: 'verbose',
description: 'Enables verbose logging.',
}),
renameEmpty: option({
type: string,
defaultValue: () => '_',
long: 'rename-empty',
description: 'Use this name for empty filenames.',
}),
exiftoolArgs: multioption({
type: array(string),
short: 'e',
long: 'exiftool-arg',
description: '',
}),
};