diff --git a/README.adoc b/README.adoc index 785058b..782eab8 100644 --- a/README.adoc +++ b/README.adoc @@ -124,21 +124,22 @@ filename Filename of the output PDF file Options: -s , --size Size of the slides deck viewport: x (e.g. '1280x720') -p , --pause Duration in milliseconds before each slide is exported [1000] - --load-pause Duration in milliseconds between the page has loaded - and starting to export slides [0] - --url-load-timeout Timeout in milliseconds to use when waiting for the initial - URL to load [60000] - --page-load-timeout Timeout in milliseconds to use when waiting for the slide deck - page to load [20000] + --load-pause Duration in milliseconds between the page has loaded and starting to export slides [0] + --url-load-timeout Timeout in milliseconds to use when waiting for the initial URL to load [60000] + --page-load-timeout Timeout in milliseconds to use when waiting for the slide deck page to load [20000] + --buffer-timeout Timeout in milliseconds to use when waiting for a slide to finish buffering (set to 0 to disable) [30000] --screenshots Capture each slide as an image [false] --screenshots-directory Screenshots output directory [screenshots] - --screenshots-size Screenshots resolution, can be repeated [--size] + --screenshots-size Screenshots resolution, can be repeated --screenshots-format Screenshots image format, one of [jpg, png] [png] - --slides Range of slides to be exported, a combination of slide indexes - and ranges (e.g. '1-3,5,8') - --chrome-path Path to the Chromium or Chrome executable to run instead of the - bundled Chromium + --slides Range of slides to be exported, a combination of slide indexes and ranges (e.g. '1-3,5,8') + --headless Puppeteer headless mode, one if [new, true, false] [new] + --headers HTTP headers, comma-separated list of
, pairs (e.g. "Authorization,'Bearer ASDJASLKJALKSJDL'") + --chrome-path Path to the Chromium or Chrome executable to run instead of the bundled Chromium --chrome-arg Additional argument to pass to the Chrome instance, can be repeated + --pdf-author String to set as the author of the resulting PDF document + --pdf-title String to set as the title of the resulting PDF document + --pdf-subject String to set as the subject of the resulting PDF document Defaults to the automatic command. Iterates over the available plugins, picks the compatible one for presentation at the diff --git a/decktape.js b/decktape.js index 7bc2d57..c686857 100755 --- a/decktape.js +++ b/decktape.js @@ -104,13 +104,13 @@ parser.script('decktape').options({ }, headless : { default : 'new', // false to enable headed mode and true to enable old puppeteer headless. See: https://developer.chrome.com/articles/new-headless/#new-headless-in-puppeteer - help : 'Control headless mode puppeteer.', + help : 'Puppeteer headless mode, one if [new, true, false]', }, headers : { type : 'string', callback : parseHeaders, transform : parseHeaders, - help : 'Add headers to puppetter page instance. Comma deliminated list of strings.
,. E.g. -headers "Authorization,\'Bearer ASDJASLKJALKSJDL\'"', + help : 'HTTP headers, comma-separated list of
, pairs (e.g. "Authorization,\'Bearer ASDJASLKJALKSJDL\'")', }, // Chrome options chromePath : { @@ -131,32 +131,32 @@ parser.script('decktape').options({ full : 'pdf-author', metavar : '', type : 'string', - help : 'String to set as the author of the resulting pdf document', + help : 'String to set as the author of the resulting PDF document', }, metaTitle : { full : 'pdf-title', metavar : '', type : 'string', - help : 'String to set as the title of the resulting pdf document', + help : 'String to set as the title of the resulting PDF document', }, metaSubject : { full : 'pdf-subject', metavar : '', type : 'string', - help : 'String to set as the subject of the resulting pdf document', + help : 'String to set as the subject of the resulting PDF document', }, }); function parseHeaders(headerString) { - const h = headerString.split(",") + const h = headerString.split(","); if ((h.length % 2) != 0) { - return 'header flag must be a comma delimited key value pairing and should always have an even number of kv pairs' + return 'header flag must be a comma delimited key value pairing and should always have an even number of kv pairs'; } - let headers = {} + let headers = {}; for (let i = 0; i < h.length; i += 2) { - headers[h[i]] = h[i+1] + headers[h[i]] = h[i+1]; } - return headers + return headers; } function parseSize(size) {