pandoc oneliner from reStructuredText to html
Posted by jpluimers on 2016/05/12
[WayBack] Pandoc is so versatile that you sometimes forget a conversion can be as simple as a one-liner:
pandoc -s README.rst -o readme.html
This converts the reStructured text in README.rst to html.
Pandoc is smart enough to recognise the conversions without you telling the formats with -f
(input format) and -t
(output format) explicitly.
If you do need to explicitly specify the format, it is useful to query which formats are supported as per [WayBack] Pandoc – Pandoc User’s Guide: specifying formats:
pandoc --list-input-formats
pandoc --list-output-formats
On my system, these are supported:
pandoc --list-input-formats
commonmark creole docbook docx epub fb2 gfm haddock html jats json latex markdown markdown_github markdown_mmd markdown_phpextra markdown_strict mediawiki muse native odt opml org rst t2t textile tikiwiki twiki vimwikia
pandoc --list-output-formats
asciidoc beamer commonmark context docbook docbook4 docbook5 docx dokuwiki dzslides epub epub2 epub3 fb2 gfm haddock html html4 html5 icml jats json latex man markdown markdown_github markdown_mmd markdown_phpextra markdown_strict mediawiki ms muse native odt opendocument opml org plain pptx revealjs rst rtf s5 slideous slidy tei texinfo textile zimwiki
–jeroen
Leave a Reply