class Publisher: (source)
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 |
Undocumented |
Method | debugging |
Undocumented |
Method | get |
Return settings from components and config files. |
Method | process |
Parse command line arguments and set ``self.settings``. |
Method | process |
Undocumented |
Method | prompt |
Print info and prompt when waiting for input from a terminal. |
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_ |
Undocumented |
Method | report_ |
Undocumented |
Method | report_ |
Undocumented |
Method | set |
Undocumented |
Method | set |
Undocumented |
Method | set |
Undocumented |
Method | set |
Set `self.reader` by name. |
Method | set |
Undocumented |
Method | set |
Set `self.writer` by name. |
Method | setup |
Undocumented |
Instance Variable | destination |
The destination for docutils output, a `docutils.io.Output` instance. |
Instance Variable | destination |
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 |
The class for dynamically created source objects. |
Instance Variable | writer |
A `docutils.writers.Writer` instance. |
Method | _setup |
Undocumented |
Instance Variable | _stderr |
Undocumented |
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).
Return settings from components and config files. Please set components first (`self.set_reader` & `self.set_writer`). Use keyword arguments to override component defaults (before updating from configuration files). Calling this function also sets `self.settings` which makes `self.publish()` skip parsing command line options.
Parse command line arguments and set ``self.settings``. Pass an empty sequence to `argv` to avoid reading `sys.argv` (the default behaviour). Set components first (`self.set_reader` & `self.set_writer`).
Undocumented
Process command line options and arguments (if `self.settings` not already set), run `self.reader` and then `self.writer`. Return `self.writer`'s output.
Undocumented
An object containing Docutils settings as instance attributes. Set by `self.process_command_line()` or `self.get_settings()`.