UNPKG

@opendnd/personae

Version:

This tool is used to generate a person either NPC or other Edit

23 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const common_1 = require("./common"); const personae_1 = require("./personae"); const saver_1 = require("./saver"); const program = require("commander"); // program basics program .option("-c, --child <file>", "child *.per file") .option("-o, --output <dir>", "output directory") .parse(process.argv); if (program.child) { const outputDir = program.output || "."; const personae = new personae_1.default(); const person = saver_1.default.load(program.child); const parents = personae.generateParents(person); process.stdout.write(personae_1.default.output(parents.mother)); saver_1.default.finish(outputDir, common_1.saveMsg("mother"), parents.mother, parents.mother.name, () => { process.stdout.write(personae_1.default.output(parents.father)); saver_1.default.finish(outputDir, common_1.saveMsg("father"), parents.father, parents.father.name, undefined); }); } //# sourceMappingURL=program-parents.js.map