Author: | David Goodger, Günter Milde |
---|---|
Contact: | docutils-develop@lists.sourceforge.net |
Date: | 2024-08-15 |
Revision: | 9906 |
Copyright: | This document has been placed in the public domain. |
Docutils runtime settings are assembled from several sources:
The individual settings are described in Docutils Configuration.
Docutils overlays settings in the following order (later sources overwrite earlier ones):
Applications may opt-out of the standard settings processing providing their own set of settings.
For details see the docutils/__init__.py, docutils/core.py, and docutils.frontend.py modules and the implementation description in Runtime Settings Processing.
Note
Implementation details will change with the move to replace the deprecated optparse module with argparse.
The docutils.SettingsSpec base class is inherited by Docutils components and frontend.OptionParser. It defines six attributes:
a sequence of
For examples, see the source of frontend.OptionParser.settings_spec or the settings_spec attributes of the Docutils components.
The last two attributes define which configuration file sections are "active". See also Configuration File Sections & Entries in the Docutils Configuration guide.
Docutils front-ends and applications combine a selection of components of the Docutils Project Model (reader, parser, writer).
All components inherit the SettingsSpec base class. This means that all instances of readers.Reader, parsers.Parser, and writers.Writer are also instances of docutils.SettingsSpec.
For the determination of runtime settings, frontend.OptionParser and applications providing a SettingsSpec instance via the settings specification arguments of the Publisher convenience functions are treated as components as well.
The name settings_spec may refer to