pandoc-converter
Version:
Another wrapper for pandoc, including automatic binary download
361 lines (353 loc) • 14.7 kB
JavaScript
/* cSpell:disable */
/** @module pandoc-types */
/** @typedef {'biblatex'|'bibtex'|'bits'|'commonmark'|'commonmark_x'|'creole'|'csljson'|'csv'|'djot'|'docbook'|'docx'|'dokuwiki'|'endnotexml'|'epub'|'fb2'|'gfm'|'haddock'|'html'|'ipynb'|'jats'|'jira'|'json'|'latex'|'man'|'markdown'|'markdown_github'|'markdown_mmd'|'markdown_phpextra'|'markdown_strict'|'mdoc'|'mediawiki'|'muse'|'native'|'odt'|'opml'|'org'|'pod'|'ris'|'rst'|'rtf'|'t2t'|'textile'|'tikiwiki'|'tsv'|'twiki'|'typst'|'vimwiki'} InputFormat */
/** @typedef {'ansi'|'asciidoc'|'asciidoc_legacy'|'asciidoctor'|'beamer'|'biblatex'|'bibtex'|'chunkedhtml'|'commonmark'|'commonmark_x'|'context'|'csljson'|'djot'|'docbook'|'docbook4'|'docbook5'|'docx'|'dokuwiki'|'dzslides'|'epub'|'epub2'|'epub3'|'fb2'|'gfm'|'haddock'|'html'|'html4'|'html5'|'icml'|'ipynb'|'jats'|'jats_archiving'|'jats_articleauthoring'|'jats_publishing'|'jira'|'json'|'latex'|'man'|'markdown'|'markdown_github'|'markdown_mmd'|'markdown_phpextra'|'markdown_strict'|'markua'|'mediawiki'|'ms'|'muse'|'native'|'odt'|'opendocument'|'opml'|'org'|'pdf'|'plain'|'pptx'|'revealjs'|'rst'|'rtf'|'s5'|'slideous'|'slidy'|'tei'|'texinfo'|'textile'|'typst'|'xwiki'|'zimwiki'} OutputFormat */
/** @typedef {object} PandocOptions
* @property {InputFormat=} from `--from=FORMAT`
* @property {OutputFormat=} to `--to=FORMAT`
* @property {string=} output `--output=FILE`
* @property {string=} dataDir `--data-dir=DIRECTORY`
* @property {PandocMetadata[]=} metadata `--metadata=KEY[:VALUE]`
* @property {string=} metadataFile `--metadata-file=FILE`
* @property {string=} defaults `--defaults=FILE`
* @property {'true'|'false'=} fileScope `--file-scope[=true|false]`
* @property {'true'|'false'=} sandbox `--sandbox[=true|false]`
* @property {'true'|'false'=} standalone `--standalone[=true|false]`
* @property {string=} template `--template=FILE`
* @property {PandocVariable[]=} variable `--variable=KEY[:VALUE]`
* @property {'auto'|'none'|'preserve'=} wrap `--wrap=auto|none|preserve`
* @property {'true'|'false'=} ascii `--ascii[=true|false]`
* @property {'true'|'false'=} toc `--toc[=true|false]`
* @property {number=} tocDepth `--toc-depth=NUMBER`
* @property {'true'|'false'=} lof `--lof[=true|false]`
* @property {'true'|'false'=} lot `--lot[=true|false]`
* @property {'true'|'false'=} numberSections `--number-sections[=true|false]`
* @property {string=} numberOffset `--number-offset=NUMBERS`
* @property {'section'|'chapter'|'part'=} topLevelDivision `--top-level-division=section|chapter|part`
* @property {string=} extractMedia `--extract-media=PATH`
* @property {string=} resourcePath `--resource-path=SEARCHPATH`
* @property {string=} includeInHeader `--include-in-header=FILE`
* @property {string=} includeBeforeBody `--include-before-body=FILE`
* @property {string=} includeAfterBody `--include-after-body=FILE`
* @property {boolean=} noHighlight `--no-highlight`
* @property {string=} highlightStyle `--highlight-style=STYLE|FILE`
* @property {string=} syntaxDefinition `--syntax-definition=FILE`
* @property {number=} dpi `--dpi=NUMBER`
* @property {'crlf'|'lf'|'native'=} eol `--eol=crlf|lf|native`
* @property {number=} columns `--columns=NUMBER`
* @property {'true'|'false'=} preserveTabs `--preserve-tabs[=true|false]`
* @property {number=} tabStop `--tab-stop=NUMBER`
* @property {string=} pdfEngine `--pdf-engine=PROGRAM`
* @property {string=} pdfEngineOpt `--pdf-engine-opt=STRING`
* @property {string=} referenceDoc `--reference-doc=FILE`
* @property {'true'|'false'=} selfContained `--self-contained[=true|false]`
* @property {'true'|'false'=} embedResources `--embed-resources[=true|false]`
* @property {'true'|'false'=} linkImages `--link-images[=true|false]`
* @property {PandocRequestHeader[]=} requestHeader `--request-header=NAME:VALUE`
* @property {'true'|'false'=} noCheckCertificate `--no-check-certificate[=true|false]`
* @property {string=} abbreviations `--abbreviations=FILE`
* @property {string=} indentedCodeClasses `--indented-code-classes=STRING`
* @property {string=} defaultImageExtension `--default-image-extension=extension`
* @property {string=} filter `--filter=PROGRAM`
* @property {string=} luaFilter `--lua-filter=SCRIPTPATH`
* @property {number=} shiftHeadingLevelBy `--shift-heading-level-by=NUMBER`
* @property {number=} baseHeaderLevel `--base-header-level=NUMBER`
* @property {'accept'|'reject'|'all'=} trackChanges `--track-changes=accept|reject|all`
* @property {'true'|'false'=} stripComments `--strip-comments[=true|false]`
* @property {'true'|'false'=} referenceLinks `--reference-links[=true|false]`
* @property {'block'|'section'|'document'=} referenceLocation `--reference-location=block|section|document`
* @property {'above'|'below'=} figureCaptionPosition `--figure-caption-position=above|below`
* @property {'above'|'below'=} tableCaptionPosition `--table-caption-position=above|below`
* @property {'setext'|'atx'=} markdownHeadings `--markdown-headings=setext|atx`
* @property {'true'|'false'=} listTables `--list-tables[=true|false]`
* @property {'true'|'false'=} listings `--listings[=true|false]`
* @property {'true'|'false'=} incremental `--incremental[=true|false]`
* @property {number=} slideLevel `--slide-level=NUMBER`
* @property {'true'|'false'=} sectionDivs `--section-divs[=true|false]`
* @property {'true'|'false'=} htmlQTags `--html-q-tags[=true|false]`
* @property {'none'|'javascript'|'references'=} emailObfuscation `--email-obfuscation=none|javascript|references`
* @property {string=} idPrefix `--id-prefix=STRING`
* @property {string=} titlePrefix `--title-prefix=STRING`
* @property {string=} css `--css=URL`
* @property {string=} epubSubdirectory `--epub-subdirectory=DIRNAME`
* @property {string=} epubCoverImage `--epub-cover-image=FILE`
* @property {'true'|'false'=} epubTitlePage `--epub-title-page[=true|false]`
* @property {string=} epubMetadata `--epub-metadata=FILE`
* @property {string=} epubEmbedFont `--epub-embed-font=FILE`
* @property {number=} splitLevel `--split-level=NUMBER`
* @property {string=} chunkTemplate `--chunk-template=PATHTEMPLATE`
* @property {number=} epubChapterLevel `--epub-chapter-level=NUMBER`
* @property {'all'|'none'|'best'=} ipynbOutput `--ipynb-output=all|none|best`
* @property {boolean=} citeproc `--citeproc`
* @property {string=} bibliography `--bibliography=FILE`
* @property {string=} csl `--csl=FILE`
* @property {string=} citationAbbreviations `--citation-abbreviations=FILE`
* @property {boolean=} natbib `--natbib`
* @property {boolean=} biblatex `--biblatex`
* @property {boolean=} mathml `--mathml`
* @property {string=} webtex `--webtex[=URL]`
* @property {string=} mathjax `--mathjax[=URL]`
* @property {string=} katex `--katex[=URL]`
* @property {boolean=} gladtex `--gladtex`
* @property {'true'|'false'=} trace `--trace[=true|false]`
* @property {'true'|'false'=} dumpArgs `--dump-args[=true|false]`
* @property {'true'|'false'=} ignoreArgs `--ignore-args[=true|false]`
* @property {boolean=} verbose `--verbose`
* @property {boolean=} quiet `--quiet`
* @property {'true'|'false'=} failIfWarnings `--fail-if-warnings[=true|false]`
* @property {string=} log `--log=FILE`
* @property {boolean=} bashCompletion `--bash-completion`
* @property {boolean=} listInputFormats `--list-input-formats`
* @property {boolean=} listOutputFormats `--list-output-formats`
* @property {(InputFormat|OutputFormat)=} listExtensions `--list-extensions[=FORMAT]`
* @property {boolean=} listHighlightLanguages `--list-highlight-languages`
* @property {boolean=} listHighlightStyles `--list-highlight-styles`
* @property {(InputFormat|OutputFormat)=} printDefaultTemplate `--print-default-template=FORMAT`
* @property {string=} printDefaultDataFile `--print-default-data-file=FILE`
* @property {string=} printHighlightStyle `--print-highlight-style=STYLE|FILE`
* @property {boolean=} version `--version`
* @property {boolean=} help `--help`
*/
//
/** @typedef {object} PandocMetadata
* @property {string} key The key property.
* @property {string=} value The value property.
*/
//
/** @typedef {object} PandocVariable
* @property {string} key The key property.
* @property {string=} value The value property.
*/
//
/** @typedef {object} PandocRequestHeader
* @property {string} name The name property.
* @property {string} value The value property.
*/
//
/** @enum {string} */
exports.Literals = {
from: '--from',
to: '--to',
output: '--output',
dataDir: '--data-dir',
metadata: '--metadata',
metadataFile: '--metadata-file',
defaults: '--defaults',
fileScope: '--file-scope',
sandbox: '--sandbox',
standalone: '--standalone',
template: '--template',
variable: '--variable',
wrap: '--wrap',
ascii: '--ascii',
toc: '--toc',
tocDepth: '--toc-depth',
lof: '--lof',
lot: '--lot',
numberSections: '--number-sections',
numberOffset: '--number-offset',
topLevelDivision: '--top-level-division',
extractMedia: '--extract-media',
resourcePath: '--resource-path',
includeInHeader: '--include-in-header',
includeBeforeBody: '--include-before-body',
includeAfterBody: '--include-after-body',
noHighlight: '--no-highlight',
highlightStyle: '--highlight-style',
syntaxDefinition: '--syntax-definition',
dpi: '--dpi',
eol: '--eol',
columns: '--columns',
preserveTabs: '--preserve-tabs',
tabStop: '--tab-stop',
pdfEngine: '--pdf-engine',
pdfEngineOpt: '--pdf-engine-opt',
referenceDoc: '--reference-doc',
selfContained: '--self-contained',
embedResources: '--embed-resources',
linkImages: '--link-images',
requestHeader: '--request-header',
noCheckCertificate: '--no-check-certificate',
abbreviations: '--abbreviations',
indentedCodeClasses: '--indented-code-classes',
defaultImageExtension: '--default-image-extension',
filter: '--filter',
luaFilter: '--lua-filter',
shiftHeadingLevelBy: '--shift-heading-level-by',
baseHeaderLevel: '--base-header-level',
trackChanges: '--track-changes',
stripComments: '--strip-comments',
referenceLinks: '--reference-links',
referenceLocation: '--reference-location',
figureCaptionPosition: '--figure-caption-position',
tableCaptionPosition: '--table-caption-position',
markdownHeadings: '--markdown-headings',
listTables: '--list-tables',
listings: '--listings',
incremental: '--incremental',
slideLevel: '--slide-level',
sectionDivs: '--section-divs',
htmlQTags: '--html-q-tags',
emailObfuscation: '--email-obfuscation',
idPrefix: '--id-prefix',
titlePrefix: '--title-prefix',
css: '--css',
epubSubdirectory: '--epub-subdirectory',
epubCoverImage: '--epub-cover-image',
epubTitlePage: '--epub-title-page',
epubMetadata: '--epub-metadata',
epubEmbedFont: '--epub-embed-font',
splitLevel: '--split-level',
chunkTemplate: '--chunk-template',
epubChapterLevel: '--epub-chapter-level',
ipynbOutput: '--ipynb-output',
citeproc: '--citeproc',
bibliography: '--bibliography',
csl: '--csl',
citationAbbreviations: '--citation-abbreviations',
natbib: '--natbib',
biblatex: '--biblatex',
mathml: '--mathml',
webtex: '--webtex',
mathjax: '--mathjax',
katex: '--katex',
gladtex: '--gladtex',
trace: '--trace',
dumpArgs: '--dump-args',
ignoreArgs: '--ignore-args',
verbose: '--verbose',
quiet: '--quiet',
failIfWarnings: '--fail-if-warnings',
log: '--log',
bashCompletion: '--bash-completion',
listInputFormats: '--list-input-formats',
listOutputFormats: '--list-output-formats',
listExtensions: '--list-extensions',
listHighlightLanguages: '--list-highlight-languages',
listHighlightStyles: '--list-highlight-styles',
printDefaultTemplate: '--print-default-template',
printDefaultDataFile: '--print-default-data-file',
printHighlightStyle: '--print-highlight-style',
version: '--version',
help: '--help'
};
/** @enum {string} */
exports.InputFormats = {
biblatex: 'biblatex',
bibtex: 'bibtex',
bits: 'bits',
commonmark: 'commonmark',
commonmark_x: 'commonmark_x',
creole: 'creole',
csljson: 'csljson',
csv: 'csv',
djot: 'djot',
docbook: 'docbook',
docx: 'docx',
dokuwiki: 'dokuwiki',
endnotexml: 'endnotexml',
epub: 'epub',
fb2: 'fb2',
gfm: 'gfm',
haddock: 'haddock',
html: 'html',
ipynb: 'ipynb',
jats: 'jats',
jira: 'jira',
json: 'json',
latex: 'latex',
man: 'man',
markdown: 'markdown',
markdown_github: 'markdown_github',
markdown_mmd: 'markdown_mmd',
markdown_phpextra: 'markdown_phpextra',
markdown_strict: 'markdown_strict',
mdoc: 'mdoc',
mediawiki: 'mediawiki',
muse: 'muse',
native: 'native',
odt: 'odt',
opml: 'opml',
org: 'org',
pod: 'pod',
ris: 'ris',
rst: 'rst',
rtf: 'rtf',
t2t: 't2t',
textile: 'textile',
tikiwiki: 'tikiwiki',
tsv: 'tsv',
twiki: 'twiki',
typst: 'typst',
vimwiki: 'vimwiki'
};
/** @enum {string} */
exports.OutputFormats = {
ansi: 'ansi',
asciidoc: 'asciidoc',
asciidoc_legacy: 'asciidoc_legacy',
asciidoctor: 'asciidoctor',
beamer: 'beamer',
biblatex: 'biblatex',
bibtex: 'bibtex',
chunkedhtml: 'chunkedhtml',
commonmark: 'commonmark',
commonmark_x: 'commonmark_x',
context: 'context',
csljson: 'csljson',
djot: 'djot',
docbook: 'docbook',
docbook4: 'docbook4',
docbook5: 'docbook5',
docx: 'docx',
dokuwiki: 'dokuwiki',
dzslides: 'dzslides',
epub: 'epub',
epub2: 'epub2',
epub3: 'epub3',
fb2: 'fb2',
gfm: 'gfm',
haddock: 'haddock',
html: 'html',
html4: 'html4',
html5: 'html5',
icml: 'icml',
ipynb: 'ipynb',
jats: 'jats',
jats_archiving: 'jats_archiving',
jats_articleauthoring: 'jats_articleauthoring',
jats_publishing: 'jats_publishing',
jira: 'jira',
json: 'json',
latex: 'latex',
man: 'man',
markdown: 'markdown',
markdown_github: 'markdown_github',
markdown_mmd: 'markdown_mmd',
markdown_phpextra: 'markdown_phpextra',
markdown_strict: 'markdown_strict',
markua: 'markua',
mediawiki: 'mediawiki',
ms: 'ms',
muse: 'muse',
native: 'native',
odt: 'odt',
opendocument: 'opendocument',
opml: 'opml',
org: 'org',
pdf: 'pdf',
plain: 'plain',
pptx: 'pptx',
revealjs: 'revealjs',
rst: 'rst',
rtf: 'rtf',
s5: 's5',
slideous: 'slideous',
slidy: 'slidy',
tei: 'tei',
texinfo: 'texinfo',
textile: 'textile',
typst: 'typst',
xwiki: 'xwiki',
zimwiki: 'zimwiki'
};