sphinx.environment.BuildEnvironment
- class sphinx.environment.BuildEnvironment(app: Sphinx = None)
The environment in which the ReST files are translated. Stores an inventory of cross-file targets and provides doctree transformations to resolve links to them.
- __init__(app: Sphinx = None)
Methods
__init__([app])apply_post_transforms(doctree, docname)Apply all post-transforms.
check_consistency()Do consistency checks.
check_dependents(app, already)clear_doc(docname)Remove all traces of a source file in the inventory.
collect_relations()doc2path(docname[, base])Return the filename for the document name.
find_files(config, builder)Find all source files in the source dir and put them in self.found_docs.
get_and_resolve_doctree(docname, builder[, ...])Read the doctree from the pickle, resolve cross-references and toctrees and return it.
get_doctree(docname)Read the doctree for a file from the pickle and return it.
get_domain(domainname)Return the domain instance with the specified name.
get_outdated_files(config_changed)Return (added, changed, removed) sets.
merge_info_from(docnames, other, app)Merge global information gathered about docnames while reading them from the other environment.
new_serialno([category])Return a serial number, e.g.
note_dependency(filename)Add filename as a dependency of the current document.
note_included(filename)Add filename as a included from other document.
Add the current document to the list of documents that will automatically be re-read at the next build.
path2doc(filename)Return the docname for the filename if the file is document.
prepare_settings(docname)Prepare to set up environment for reading.
relfn2path(filename[, docname])Return paths to a file referenced from a document, relative to documentation root and absolute.
resolve_references(doctree, fromdocname, builder)resolve_toctree(docname, builder, toctree[, ...])Resolve a toctree node into individual bullet lists with titles as items, returning None (if no containing titles are found) or a new node.
set_versioning_method(method, compare)This sets the doctree versioning method for this environment.
setup(app)Set up BuildEnvironment object.
Attributes
Returns the docname of the document currently being parsed.
contains all existing docnames.
domains