Abstract base class for docutils Writers.
Each writer module or package must export a subclass also called 'Writer'. Each writer must support all standard node types listed in docutils.nodes.node_class_names.
The write() method is the main entry point.
There are no implemented interfaces.
component_type
(type:
str
)
'writer'
config_section
(type:
str
)
'writers'
config_section_dependencies
(type: NoneType
)
None
default_transforms
(type:
tuple
)
()
destination
(type: NoneType
)
None
document
(type: NoneType
)
None
language
(type: NoneType
)
None
output
(type: NoneType
)
None
relative_path_settings
(type:
tuple
)
()
settings_default_overrides
(type: NoneType
)
None
settings_defaults
(type: NoneType
)
None
settings_spec
(type:
tuple
)
()
supported
(type:
tuple
)
()
unknown_reference_resolvers
(type:
tuple
)
()
assemble_parts()
Assemble the self.parts dictionary. Extend in subclasses.
get_transforms()
supports(format)
Is format supported by this component?
To be used by transforms to ask the dependent component if it supports a certain input context or output format.
translate()
Do final translation of self.document into self.output. Called from write. Override in subclasses.
Usually done with a docutils.nodes.NodeVisitor subclass, in combination with a call to docutils.nodes.Node.walk() or docutils.nodes.Node.walkabout(). The NodeVisitor subclass must support all standard elements (listed in docutils.nodes.node_class_names) and possibly non-standard elements used by the current Reader as well.
write(document, destination)
Process a document into its final form.
Translate document (a Docutils document tree) into the Writer's native format, and write it out to its destination (a docutils.io.Output subclass object).
Normally not overridden or extended in subclasses.