UNPKG

image-classifier-ts

Version:

Command line tool to auto-classify images, renaming them with appropriate labels. Uses Node and Google Vision API.

31 lines 2.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UsageText = void 0; var UsageText; (function (UsageText) { var NEW_LINE = "\n"; var NEXT_COLUMN = "\t"; function showUsage() { var scriptName = "node ".concat(process.argv[1]); console.error([ "image-classifier-ts", "USAGE: ".concat(scriptName, " <path to input dir> <path to output dir> [options]"), " where options can be:", " -derivedLocationFormat=<format>".concat(NEXT_COLUMN, "(The format of the 'location' part of the filename for images with a location derived by date)"), " example: -derivedLocationFormat={country}_{area1}_{area2}_{area3}", " -dryRun".concat(NEXT_COLUMN, "(Perform a 'dry run' without actually moving any files)."), " -filenameFormat=<format>", " example: -filenameFormat={year}/{location}/{topLabel}/{combinedLabels}-{fileSizeMb}-{width}x{height}--{filename}", " -geoCode".concat(NEXT_COLUMN, "(Try to identify the address (geographical location) of the image)."), " -help OR -h".concat(NEXT_COLUMN, "(show this usage text)"), " -locationFormat=<format>".concat(NEXT_COLUMN, "(The format of the 'location' part of the filename)"), " example: -locationFormat={country}_{area1}_{area2}_{area3}", " -minScore=<number 0-1>".concat(NEXT_COLUMN, "(Include only Google labels that have a score at least this high (0-1))"), " -replaceOnMove".concat(NEXT_COLUMN, "(Allow files to be overwritten when moving an image)"), " -topNLabels=<number>".concat(NEXT_COLUMN, "(Include the top N labels from Google.)"), " -verbosity=<number 1-3>".concat(NEXT_COLUMN, "(Verbosity of output, for debugging).") ].join(NEW_LINE)); } UsageText.showUsage = showUsage; })(UsageText = exports.UsageText || (exports.UsageText = {})); //# sourceMappingURL=UsageText.js.map