| | |
| | | }, |
| | | concurrency: { |
| | | number: true, |
| | | describe: "how many threads to use to parse notes" |
| | | } |
| | | describe: "how many threads to use to parse notes", |
| | | }, |
| | | } |
| | | |
| | | function escapePath(fp) { |
| | |
| | | const log = new QuartzLogger(argv.verbose) |
| | | |
| | | const CHUNK_SIZE = 128 |
| | | let concurrency = ctx.argv.concurrency ?? (fps.length < CHUNK_SIZE ? 1 : os.availableParallelism()) |
| | | let concurrency = |
| | | ctx.argv.concurrency ?? (fps.length < CHUNK_SIZE ? 1 : os.availableParallelism()) |
| | | |
| | | let res: ProcessedContent[] = [] |
| | | log.start(`Parsing input files using ${concurrency} threads`) |
| | |
| | | lines.push("") |
| | | lines.push( |
| | | "\n" + |
| | | chalk.bgRed.black.bold(" ERROR ") + |
| | | "\n" + |
| | | chalk.red(` ${msg}`) + |
| | | (err.message.length > 0 ? `: ${err.message}` : ""), |
| | | chalk.bgRed.black.bold(" ERROR ") + |
| | | "\n" + |
| | | chalk.red(` ${msg}`) + |
| | | (err.message.length > 0 ? `: ${err.message}` : ""), |
| | | ) |
| | | |
| | | if (!stack) { |