'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 publish(self, argv=None, usage=None, description=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=None):

    exit = None
    try:
        if (self.settings is None):
            self.process_command_line(argv, usage, description, settings_spec, config_section, **(settings_overrides or {}))
        self.set_io()
        self.document = self.reader.read(self.source, self.parser, self.settings)
        self.apply_transforms()
        output = self.writer.write(self.document, self.destination)
        self.writer.assemble_parts()
    except SystemExit as error:
        exit = 1
        exit_status = error.code
    except Exception as error:
        if (not self.settings):
            raise
        if self.settings.traceback:
            self.debugging_dumps()
            raise
        self.report_Exception(error)
        exit = 1
        exit_status = 1
    self.debugging_dumps()
    if (enable_exit_status and self.document and (self.document.reporter.max_level >= self.settings.exit_status_level)):
        sys.exit((self.document.reporter.max_level + 10))
    elif exit:
        sys.exit(exit_status)
    return output
