Writing new builders

XXX to be expanded.

class sphinx.builder.Builder

This is the base class for all builders.

These methods are predefined and will be called from the application:

Builder.load_env()
Set up the build environment.
Builder.get_relative_uri(from_, to, typ=None)
Return a relative URI between two source filenames. May raise environment.NoUri if there’s no way to return a sensible URI.
Builder.build_all()
Build all source files.
Builder.build_specific(filenames)
Only rebuild as much as needed for changes in the source_filenames.
Builder.build_update()
Only rebuild files changed or added since last build.
Builder.build(docnames, summary=None, method='update')

These methods must be overridden in concrete builder classes:

Builder.init()
Load necessary templates and perform initialization.
Builder.get_outdated_docs()
Return an iterable of output files that are outdated, or a string describing what an update build will build.
Builder.get_target_uri(docname, typ=None)
Return the target URI for a document name (typ can be used to qualify the link characteristic for individual builders).
Builder.prepare_writing(docnames)
Builder.write_doc(docname, doctree)
Builder.finish()