Command-line and common processing for Docutils front-end tools.
Exports the following classes:
OptionParser
: Standard Docutils command-line processing.Option
: Customized version ofoptparse.Option
; validation support.Values
: Runtime settings; objects are simple structs (object.attribute). Supports cumulative list settings (attributes).ConfigParser
: Standard Docutils config file processing.
Also exports the following functions:
- Option callbacks:
store_multiple
,read_config_file
. - Setting validators:
validate_encoding
,validate_encoding_error_handler
,validate_encoding_and_error_handler
,validate_boolean
,validate_ternary
,validate_threshold
,validate_colon_separated_list
,validate_comma_separated_list
,validate_dependency_file
. make_paths_absolute
.- SettingSpec manipulation:
filter_settings_spec
.
Class |
|
No class docstring; 2/2 instance variables, 1/3 class variable, 3/6 methods documented |
Class |
|
No class docstring; 0/1 constant, 1/1 method documented |
Class |
|
Parser for command-line and library use. The settings_spec specification here and in other Docutils components are merged to build the set of command-line options and runtime settings for this process. |
Class |
|
Updates list attributes by extension rather than by replacement. Works in conjunction with the OptionParser.lists instance attribute. |
Exception |
|
Warning for deprecated configuration file features. |
Function | filter |
Return a copy of settings_spec excluding/replacing some settings. |
Function | make |
Undocumented |
Function | make |
Interpret filesystem path settings relative to the base_path given. |
Function | read |
Read a configuration file during option processing. (Option callback.) |
Function | store |
Store multiple values in parser.values . (Option callback.) |
Function | validate |
Check/normalize boolean settings: True: '1', 'on', 'yes', 'true' False: '0', 'off', 'no','false', '' |
Function | validate |
Undocumented |
Function | validate |
Check/normalize list arguments (split at "," and strip whitespace). |
Function | validate |
Undocumented |
Function | validate |
Undocumented |
Function | validate |
Side-effect: if an error handler is included in the value, it is inserted into the appropriate place as if it was a separate setting/option. |
Function | validate |
Undocumented |
Function | validate |
Undocumented |
Function | validate |
Check/normalize a comma separated list of smart quote definitions. |
Function | validate |
Undocumented |
Function | validate |
Check/normalize three-value settings: True: '1', 'on', 'yes', 'true' False: '0', 'off', 'no','false', '' any other value: returned as-is. |
Function | validate |
Undocumented |
Function | validate |
Undocumented |
Return a copy of settings_spec
excluding/replacing some settings.
settings_spec
is a tuple of configuration settings with a structure
described for docutils.SettingsSpec.settings_spec.
Optional positional arguments are names of to-be-excluded settings. Keyword arguments are option specification replacements. (See the html4strict writer for an example.)
Interpret filesystem path settings relative to the base_path
given.
Paths are values in pathdict
whose keys are in keys
. Get keys
from
OptionParser.relative_path_settings
.
Store multiple values in parser.values
. (Option callback.)
Store None
for each attribute named in args
, and store the value for
each key (attribute name) in kwargs
.
Check/normalize boolean settings: True: '1', 'on', 'yes', 'true' False: '0', 'off', 'no','false', ''
Undocumented
Check/normalize list arguments (split at "," and strip whitespace).
Undocumented
Undocumented
Side-effect: if an error handler is included in the value, it is inserted into the appropriate place as if it was a separate setting/option.
Undocumented
Undocumented
Check/normalize a comma separated list of smart quote definitions.
Return a list of (language-tag, quotes) string tuples.
Undocumented
Check/normalize three-value settings: True: '1', 'on', 'yes', 'true' False: '0', 'off', 'no','false', '' any other value: returned as-is.