pandex v0.2.0 Pandex View Source
Pandex is a lightweight ELixir wrapper for Pandoc. Pandex has no dependencies other than pandoc itself. Pandex enables you to convert Markdown, CommonMark, HTML, Latex, json, html to HTML, HTML5, opendocument, rtf, texttile, asciidoc, markdown, json and others. Pandex has no dependencies other than Pandoc itself.
Pandex enables you to perform any combination of the conversion below:
Convert From (any) | Convert To (any) |
---|---|
commonmark | asciidoc |
gfm | beamer |
html | commonmark |
json | context |
latex | docbook |
markdown | dzslides |
markdown_github * | gfm |
markdown_mmd | html |
markdown_phpextra | html5 |
markdown_strict | json |
rst | latex |
textile | man |
markdown | |
markdown_github * | |
markdown_mmd | |
markdown_phpextra | |
markdown_strict | |
mediawiki | |
opendocument | |
org | |
plain | |
rst | |
rtf | |
s5 | |
slidy | |
texinfo | |
textile |
*
Deprecated: markdown_github
. Use gfm
instead.
Usage
Pandex follows the syntax of <format from>_to_<format to> <string>
Examples:
List\n
- \n
- one \n
- two \n
- three \n
iex> Pandex.gfm_to_html("# Title \n\n## List\n\n- one\n- two\n- three\n")
List\n
- \n
one
\ntwo
\nthree
\n
iex> Pandex.latex_to_html5("\section{Title}\n\n\subsection{List}\n\n\begin{itemize}\n\tightlist\n\item\n one\n\item\n two\n\item\n three\n\end{itemize}\n")
iex> Pandex.latex_to_json("\section{Title}\label{title}\n\n\subsection{List}\label{list}\n\n\begin{itemize}\n\item\n one\n\item\n two\n\item\n three\n\end{itemize}\n") {:ok, "{\"blocks\":[{\"t\":\"Header\",\"c\":[1,[\"title\",[],[]],[{\"t\":\"Str\",\"c\":\"Title\"}]]},{\"t\":\"Header\",\"c\":[2,[\"list\",[],[]],[{\"t\":\"Str\",\"c\":\"List\"}]]},{\"t\":\"BulletList\",\"c\":[[{\"t\":\"Para\",\"c\":[{\"t\":\"Str\",\"c\":\"one\"}]}],[{\"t\":\"Para\",\"c\":[{\"t\":\"Str\",\"c\":\"two\"}]}],[{\"t\":\"Para\",\"c\":[{\"t\":\"Str\",\"c\":\"three\"}]}]]}],\"pandoc-api-version\":[1,17,5,4],\"meta\":{}}\n"}
Link to this section Summary
Functions
convert_file
works under the hood of all the other functions.
convert_string
works under the hood of all the other string conversion functions.
Link to this section Functions
commonmark_file_to_asciidoc(file, options \\ []) View Source
commonmark_file_to_beamer(file, options \\ []) View Source
commonmark_file_to_commonmark(file, options \\ []) View Source
commonmark_file_to_context(file, options \\ []) View Source
commonmark_file_to_docbook(file, options \\ []) View Source
commonmark_file_to_dzslides(file, options \\ []) View Source
commonmark_file_to_gfm(file, options \\ []) View Source
commonmark_file_to_html(file, options \\ []) View Source
commonmark_file_to_html5(file, options \\ []) View Source
commonmark_file_to_json(file, options \\ []) View Source
commonmark_file_to_latex(file, options \\ []) View Source
commonmark_file_to_man(file, options \\ []) View Source
commonmark_file_to_markdown(file, options \\ []) View Source
commonmark_file_to_markdown_github(file, options \\ []) View Source
commonmark_file_to_markdown_mmd(file, options \\ []) View Source
commonmark_file_to_markdown_phpextra(file, options \\ []) View Source
commonmark_file_to_markdown_strict(file, options \\ []) View Source
commonmark_file_to_mediawiki(file, options \\ []) View Source
commonmark_file_to_opendocument(file, options \\ []) View Source
commonmark_file_to_org(file, options \\ []) View Source
commonmark_file_to_plain(file, options \\ []) View Source
commonmark_file_to_rst(file, options \\ []) View Source
commonmark_file_to_rtf(file, options \\ []) View Source
commonmark_file_to_s5(file, options \\ []) View Source
commonmark_file_to_slidy(file, options \\ []) View Source
commonmark_file_to_texinfo(file, options \\ []) View Source
commonmark_file_to_textile(file, options \\ []) View Source
commonmark_to_asciidoc(string, options \\ []) View Source
commonmark_to_beamer(string, options \\ []) View Source
commonmark_to_commonmark(string, options \\ []) View Source
commonmark_to_context(string, options \\ []) View Source
commonmark_to_docbook(string, options \\ []) View Source
commonmark_to_dzslides(string, options \\ []) View Source
commonmark_to_gfm(string, options \\ []) View Source
commonmark_to_html(string, options \\ []) View Source
commonmark_to_html5(string, options \\ []) View Source
commonmark_to_json(string, options \\ []) View Source
commonmark_to_latex(string, options \\ []) View Source
commonmark_to_man(string, options \\ []) View Source
commonmark_to_markdown(string, options \\ []) View Source
commonmark_to_markdown_github(string, options \\ []) View Source
commonmark_to_markdown_mmd(string, options \\ []) View Source
commonmark_to_markdown_phpextra(string, options \\ []) View Source
commonmark_to_markdown_strict(string, options \\ []) View Source
commonmark_to_mediawiki(string, options \\ []) View Source
commonmark_to_opendocument(string, options \\ []) View Source
commonmark_to_org(string, options \\ []) View Source
commonmark_to_plain(string, options \\ []) View Source
commonmark_to_rst(string, options \\ []) View Source
commonmark_to_rtf(string, options \\ []) View Source
commonmark_to_s5(string, options \\ []) View Source
commonmark_to_slidy(string, options \\ []) View Source
commonmark_to_texinfo(string, options \\ []) View Source
commonmark_to_textile(string, options \\ []) View Source
convert_file(file, from, to, options \\ []) View Source
convert_file
works under the hood of all the other functions.
convert_string(string, from, to, options \\ []) View Source
convert_string
works under the hood of all the other string conversion functions.