UNPKG

protoml-parser

Version:

ProtoML is a lightweight, declarative markup language designed for writing and structuring meeting protocols, notes and task lists in a human-readable and machine-parseable format.

15 lines (12 loc) 572 B
#!/usr/bin/env node const { log, setVerbosity } = require("../src/utils/logger.js") const { parseArgs } = require("../src/cli/options.js"); const { parseFile } = require("../src/core/parser.js"); const { saveToFile } = require("../src/utils/file.js"); const renderers = require("../src/renders/index.js"); const args = parseArgs() setVerbosity(args.verbosity) const ast = parseFile(args.filename, args) const output = renderers[args.format](ast, args) saveToFile(args.output, output, args.format) log("info", `File saved to ${args.output}.${args.format}`)