imgrecog
Version:
Node.js tool to parse and act on images, using the Google Vision and Sightengine APIs.
53 lines (52 loc) • 1.27 kB
TypeScript
import asyncLib = require("async");
/**
* IMGRecog.js main module.
*/
export declare class IMGRecog {
constructor(options: Options);
/**
* Program options.
*/
options: Options;
/**
* List of scanned images with their results.
*/
results: ImageResult[];
/**
* File scanning queue.
*/
queue: asyncLib.QueueObject<any>;
/**
* If running, when did the process start.
*/
startTime: Date;
/**
* Run the thing!
*/
run: () => Promise<void>;
/**
* End the scanning tasks.
* @param kill Force kill the scanning queue.
*/
end: (kill?: boolean) => Promise<void>;
/**
* Get image files for the specified folder.
* @param folder Image file path.
*/
scanFolder: (folder: string) => void;
/**
* Scan the specified image file.
* @param filepath Image file path.
* @param callback Callback method.
*/
scanFile: (filepath: string, callback: Function) => Promise<void>;
/**
* Execute actions after all passed images have been scanned.
*/
executeActions: () => Promise<void>;
/**
* Save the execution output results to a file.
*/
saveOutput: () => Promise<void>;
}
export default IMGRecog;