const pkg = require("../package.json")
const nomnom = require("nomnom")
const exporter = require("./exporter")

const opts = nomnom
  .script("quiver2html")
  .option("paths", {
    position: 0,
    list: true,
    required: true,
    help: "Quiver notebook or note file(s)"
  }).option("output", {
    abbr: "o",
    help: "Path to the output directory"
  }).option("version", {
    abbr: "v",
    flag: true,
    help: "Print version and exit",
    callback() { return pkg.version }
  }).parse()

for (let path of opts.paths) {
  exporter.exportAsHTML(path, opts.output)
}
