NodeJS 转表工具实现

This commit is contained in:
2020-05-17 23:58:31 +08:00
parent c7f9bfbd61
commit 37aa621c6c
13 changed files with 646 additions and 5 deletions

View File

@@ -1,4 +1,18 @@
import { get_startup_arguments } from "./tiny/env";
import { ExcelExporterApplication } from "excel-exporter/ExcelExporterApplication";
import { FileAccess } from "tiny/io";
import * as colors from "colors";
(async function main(argv: string[]) {
console.log(argv);
let config_file = argv[argv.length - 1];
if (config_file.endsWith(".json") && FileAccess.exists(config_file)) {
let app = new ExcelExporterApplication(config_file);
app.parse();
app.export();
console.log(colors.green("All Done"));
} else {
console.log(colors.red("请传入配置文件作为参数"));
}
})(get_startup_arguments());