UNPKG

@summarisation/summarise

Version:

cli for summariser

42 lines (41 loc) 1.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addAllSummaryCommands = exports.addSummaryCommand = void 0; const inputs_command_1 = require("./inputs.command"); const tika_command_1 = require("./tika.command"); const text_command_1 = require("./text.command"); const report_command_1 = require("./report.command"); const validate_command_1 = require("./validate.command"); function addSummaryCommand(tc) { return { cmd: 'summary', description: `Does everything: turns pdfs => html => text => summary`, options: { '--clean': { description: 'Delete the output file directories at the start' }, '--debug': { description: 'Show debug information' }, '--onePer <type>': { description: `One file per page or per file. Legal values 'page' or 'default'. overrides config`, default: tc.config.transform.type }, '--noReport': { description: `Don't make a report` }, '--noNonFunctionals': { description: 'Do not use non functionals' }, '--dryRun': { description: `Just do a dry run instead of actually making the pipelines` } }, action: async (c, opts) => { await (0, inputs_command_1.inputsAction)(tc)(c, opts); await (0, tika_command_1.tikaAction)(tc)(c, opts); await (0, text_command_1.textAction)(tc)(c, opts); if (!opts.noReport) await (0, report_command_1.reportAction)(tc)(c, opts); } }; } exports.addSummaryCommand = addSummaryCommand; function addAllSummaryCommands(tc, cliTc) { cliTc.addCommands(tc, [ (0, validate_command_1.addValidateCommand)(tc), (0, inputs_command_1.addInputsCommand)(tc), (0, tika_command_1.addTikaCommand)(tc), (0, text_command_1.addTextCommand)(tc), addSummaryCommand(tc), (0, report_command_1.addReportCommand)(tc) ]); } exports.addAllSummaryCommands = addAllSummaryCommands;