def publish_from_doctree(document, destination_path=None, writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=False):
 reader = docutils.readers.doctree.Reader(parser_name='null')
 pub = Publisher(reader, None, writer, source=io.DocTreeInput(document), destination_class=io.StringOutput, settings=settings)
 if ((not writer) and writer_name):
  pub.set_writer(writer_name)
 pub.process_programmatic_settings(settings_spec, settings_overrides, config_section)
 pub.set_destination(None, destination_path)
 return pub.publish(enable_exit_status=enable_exit_status)

def publish_from_doctree ( document , destination_path = None , writer = None , writer_name = 'pseudoxml' , settings = None , settings_spec = None , settings_overrides = None , config_section = None , enable_exit_status = False ) : reader = docutils . readers . doctree . Reader ( parser_name = 'null' ) pub = Publisher ( reader , None , writer , source = io . DocTreeInput ( document ) , destination_class = io . StringOutput , settings = settings ) if ( ( not writer ) and writer_name ) : pub . set_writer ( writer_name ) pub . process_programmatic_settings ( settings_spec , settings_overrides , config_section ) pub . set_destination ( None , destination_path ) return pub . publish ( enable_exit_status = enable_exit_status )
set up & run a publisher to render from an existing document tree data structure .