photosite/dist/generate.js

27 lines
740 B
JavaScript
Raw Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
2024-01-08 20:10:39 +00:00
require("dotenv/config");
const log_1 = require("./log");
2024-01-08 20:10:39 +00:00
const shell_1 = require("./shell");
class Generate {
constructor() {
this.log = (0, log_1.createLog)('generate');
this.log.info(`Generating site: ${new Date()}`);
}
2024-01-08 20:10:39 +00:00
async checkInbox() {
}
async img(file) {
const cmd = ['bash', 'scripts/img.sh', file];
const shell = new shell_1.Shell(cmd);
try {
await shell.execute();
}
catch (err) {
this.log.error(err);
return;
}
this.log.info(`Processed image file for ${file}`);
}
}
new Generate();
//# sourceMappingURL=generate.js.map