publish_doctree

Function defined in docutils.core

publish_doctree(source, source_path=None, source_class=<class docutils.io.StringInput at 0x02391B90>, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', settings=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=False)

Set up & run a Publisher for programmatic use with string I/O. Return the document tree.

For encoded string input, be sure to set the ‘input_encoding’ setting to the desired encoding. Set it to ‘unicode’ for unencoded Unicode string input. Here’s one way:

publish_doctree(..., settings_overrides={'input_encoding': 'unicode'})

Parameters: see publish_programmatically.

Previous topic

publish_cmdline_to_binary

Next topic

publish_file