pandoc
[options] [input-file]...
Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.
Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx. For the full lists of input and output formats.
Note: the WASI output is taken from https://github.com/tweag/pandoc-wasm
If no input-files are specified, input is read from stdin.
Output goes to stdout by default. For output to a file,
use the -o
option:
pandoc -o output.html input.txt
By default, pandoc produces a document fragment. To produce a standalone
document (e.g. a valid HTML file including <head>
and <body>
),
use the -s
or --standalone
flag:
pandoc -s -o output.html input.txt
If multiple input files are given, pandoc will concatenate them all (with
blank lines between them) before parsing. (Use --file-scope
to parse files
individually.)