Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Module: nbconvert.utils.pandoc
¶
Utility for calling pandoc
1 Class¶
-
class
IPython.nbconvert.utils.pandoc.
PandocMissing
(*args, **kwargs)¶ Bases:
IPython.nbconvert.utils.exceptions.ConversionException
Exception raised when Pandoc is missing.
-
__init__
(*args, **kwargs)¶
-
4 Functions¶
-
IPython.nbconvert.utils.pandoc.
pandoc
(source, fmt, to, extra_args=None, encoding='utf-8')¶ Convert an input string in format from to format to via pandoc.
Parameters: source : string
Input string, assumed to be valid format from.
fmt : string
The name of the input format (markdown, etc.)
to : string
The name of the output format (html, etc.)
Returns: out : unicode
Output as returned by pandoc.
Raises: PandocMissing
If pandoc is not installed.
Any error messages generated by pandoc are printed to stderr.
-
IPython.nbconvert.utils.pandoc.
get_pandoc_version
()¶ Gets the Pandoc version if Pandoc is installed.
If the minimal version is not met, it will probe Pandoc for its version, cache it and return that value. If the minimal version is met, it will return the cached version and stop probing Pandoc (unless
clean_cache()
is called).Raises: PandocMissing
If pandoc is unavailable.
-
IPython.nbconvert.utils.pandoc.
check_pandoc_version
()¶ Returns True if minimal pandoc version is met.
Raises: PandocMissing
If pandoc is unavailable.
-
IPython.nbconvert.utils.pandoc.
clean_cache
()¶