UNPKG

image-classifier-ts

Version:

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

27 lines 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FilenameGenerator = exports.FileFormatToken = void 0; var NameGeneratorUtil_1 = require("./NameGeneratorUtil"); var FileFormatToken; (function (FileFormatToken) { FileFormatToken["CombinedLabels"] = "combinedLabels"; FileFormatToken["Filename"] = "filename"; FileFormatToken["FileSizeMb"] = "fileSizeMb"; FileFormatToken["Height"] = "height"; FileFormatToken["Location"] = "location"; FileFormatToken["TopLabel"] = "topLabel"; FileFormatToken["Width"] = "width"; FileFormatToken["Year"] = "year"; })(FileFormatToken = exports.FileFormatToken || (exports.FileFormatToken = {})); var FilenameGenerator; (function (FilenameGenerator) { function generateFilename(tokens, format) { return NameGeneratorUtil_1.NameGeneratorUtil.generateNameFromTokens(tokens, format, "file"); } FilenameGenerator.generateFilename = generateFilename; function doesFormatIncludeLocation(format) { return format.indexOf(NameGeneratorUtil_1.NameGeneratorUtil.getTokenWithBraces(FileFormatToken.Location)) >= 0; } FilenameGenerator.doesFormatIncludeLocation = doesFormatIncludeLocation; })(FilenameGenerator = exports.FilenameGenerator || (exports.FilenameGenerator = {})); //# sourceMappingURL=FilenameGenerator.js.map