class documentation

class Publisher(object):

View In Hierarchy

A facade encapsulating the high-level logic of a Docutils system.
Method __init__ Initial setup. If any of reader, parser, or writer are not specified, the corresponding set_... method should be called with a component name (set_reader sets the parser as well).
Method apply​_transforms Undocumented
Method debugging​_dumps Undocumented
Method get​_settings Set and return default settings (overrides in defaults dict).
Method process​_command​_line Pass an empty list to argv to avoid reading sys.argv (the default).
Method process​_programmatic​_settings Undocumented
Method publish Process command line options and arguments (if self.settings not already set), run self.reader and then self.writer. Return self.writer's output.
Method report_​Exception Undocumented
Method report_​System​Message Undocumented
Method report_​Unicode​Error Undocumented
Method set​_components Undocumented
Method set​_destination Undocumented
Method set​_io Undocumented
Method set​_reader Set self.reader by name.
Method set​_source Undocumented
Method set​_writer Set self.writer by name.
Method setup​_option​_parser Undocumented
Instance Variable destination The destination for docutils output, a docutils.io.Output instance.
Instance Variable destination​_class The class for dynamically created destination objects.
Instance Variable document The document tree (docutils.nodes objects).
Instance Variable parser A docutils.parsers.Parser instance.
Instance Variable reader A docutils.readers.Reader instance.
Instance Variable settings An object containing Docutils settings as instance attributes. Set by self.process_command_line() or self.get_settings().
Instance Variable source The source of input data, a docutils.io.Input instance.
Instance Variable source​_class The class for dynamically created source objects.
Instance Variable writer A docutils.writers.Writer instance.
Instance Variable ​_stderr Undocumented
def __init__(self, reader=None, parser=None, writer=None, source=None, source_class=io.FileInput, destination=None, destination_class=io.FileOutput, settings=None):
Initial setup. If any of reader, parser, or writer are not specified, the corresponding set_... method should be called with a component name (set_reader sets the parser as well).
def apply_transforms(self):

Undocumented

def debugging_dumps(self):

Undocumented

def get_settings(self, usage=None, description=None, settings_spec=None, config_section=None, **defaults):

Set and return default settings (overrides in defaults dict).

Set components first (self.set_reader & self.set_writer). Explicitly setting self.settings disables command line option processing from self.publish().

def process_command_line(self, argv=None, usage=None, description=None, settings_spec=None, config_section=None, **defaults):

Pass an empty list to argv to avoid reading sys.argv (the default).

Set components first (self.set_reader & self.set_writer).

def process_programmatic_settings(self, settings_spec, settings_overrides, config_section):

Undocumented

def publish(self, argv=None, usage=None, description=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=False):
Process command line options and arguments (if self.settings not already set), run self.reader and then self.writer. Return self.writer's output.
def report_Exception(self, error):

Undocumented

def report_SystemMessage(self, error):

Undocumented

def report_UnicodeError(self, error):

Undocumented

def set_components(self, reader_name, parser_name, writer_name):

Undocumented

def set_destination(self, destination=None, destination_path=None):

Undocumented

def set_io(self, source_path=None, destination_path=None):

Undocumented

def set_reader(self, reader_name, parser, parser_name):
Set self.reader by name.
def set_source(self, source=None, source_path=None):

Undocumented

def set_writer(self, writer_name):
Set self.writer by name.
def setup_option_parser(self, usage=None, description=None, settings_spec=None, config_section=None, **defaults):

Undocumented

destination =
The destination for docutils output, a docutils.io.Output instance.
destination_class =
The class for dynamically created destination objects.
document =
The document tree (docutils.nodes objects).
parser =
reader =
settings =
An object containing Docutils settings as instance attributes. Set by self.process_command_line() or self.get_settings().
source =
The source of input data, a docutils.io.Input instance.
source_class =
The class for dynamically created source objects.
writer =
_stderr =

Undocumented