module sphinxext.sphinx_cmdref_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_cmdref_extension
Defines a sphinx extension to keep track of cmd.
Classes¶
class |
truncated documentation |
---|---|
A |
|
defines |
|
A list of all cmdref entries, for a specific tag. |
|
defines |
Functions¶
function |
truncated documentation |
---|---|
depart_cmdref_node, see sphinx/writers/html.py. … |
|
depart_cmdref_node |
|
merge_cmdref |
|
process_cmdref_nodes |
|
Collect all cmdrefs in the environment this is not done in the directive itself because it some transformations … |
|
purge_cmdrefs |
|
setup for |
|
visit_cmdref_node |
|
visit_cmdreflist_node see sphinx/writers/html.py. … |
Properties¶
property |
truncated documentation |
---|---|
|
Return the document root node of the tree containing this Node. |
|
Return the document root node of the tree containing this Node. |
Methods¶
method |
truncated documentation |
---|---|
calls run from |
|
calls run from |
Documentation¶
Defines a sphinx extension to keep track of cmd.
- class pyquickhelper.sphinxext.sphinx_cmdref_extension.CmdRef(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
BlocRef
A
cmdref
entry, displayed in the form of an admonition. It is used to reference a script a module is added as a command line. It takes the following options:title: a title for the bloc
tag: a tag to have several categories of blocs, if not specified, it will be equal to cmd
lid or label: a label to refer to
index: to add an additional entry to the index (comma separated)
name: command line name, if populated, the directive displays the output of
name --help
.path: used if the command line startswith
-m
It works the same way as
BlocRef
. The command line can be something like-m <module> <command> ...
. The extension will call python in a separate process.- node_class[source]¶
alias of
cmdref_node
- option_spec = {'class': <function class_option>, 'cmd': <function unchanged>, 'index': <function unchanged>, 'label': <function unchanged>, 'lid': <function unchanged>, 'path': <function unchanged>, 'tag': <function unchanged>, 'title': <function unchanged>}[source]¶
Mapping of option names to validator functions.
- class pyquickhelper.sphinxext.sphinx_cmdref_extension.CmdRefList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
BlocRefList
A list of all cmdref entries, for a specific tag.
tag: a tag to have several categories of cmdref
contents: add a bullet list with links to added blocs
- node_class[source]¶
alias of
cmdreflist
- run()[source]¶
calls run from
BlocRefList
and add default tag if not present
- class pyquickhelper.sphinxext.sphinx_cmdref_extension.cmdref_node(rawsource='', *children, **attributes)[source]¶
Bases:
admonition
defines
cmdref
node
- class pyquickhelper.sphinxext.sphinx_cmdref_extension.cmdreflist(rawsource='', *children, **attributes)[source]¶
Bases:
General
,Element
defines
cmdreflist
node
- pyquickhelper.sphinxext.sphinx_cmdref_extension.depart_cmdref_node(self, node)[source]¶
depart_cmdref_node, see sphinx/writers/html.py.
- pyquickhelper.sphinxext.sphinx_cmdref_extension.depart_cmdreflist_node(self, node)[source]¶
depart_cmdref_node
- pyquickhelper.sphinxext.sphinx_cmdref_extension.process_cmdref_nodes(app, doctree, fromdocname)[source]¶
- pyquickhelper.sphinxext.sphinx_cmdref_extension.process_cmdrefs(app, doctree)[source]¶
Collect all cmdrefs in the environment this is not done in the directive itself because it some transformations must have already been run, e.g. substitutions.