module sphinxext.sphinx_todoext_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_todoext_extension
Defines a sphinx extension to give a title to a todo, inspired from todo.py.
Classes¶
class |
truncated documentation |
---|---|
A |
|
Defines |
|
A list of all todoext entries, for a specific tag. |
|
Defines |
Functions¶
function |
truncated documentation |
---|---|
depart_todoext_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
|
depart_todoext_node |
|
merge_todoext |
|
process_todoext_nodes |
|
collect all todoexts in the environment this is not done in the directive itself because it some transformations … |
|
purge_todosext |
|
Setup for |
|
visit_todoext_node |
|
visit_todoextlist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
Methods¶
method |
truncated documentation |
---|---|
builds the todo text |
|
Simply insert an empty todoextlist node which will be replaced later when process_todoext_nodes is called |
Documentation¶
Defines a sphinx extension to give a title to a todo, inspired from todo.py.
-
class
pyquickhelper.sphinxext.sphinx_todoext_extension.
TodoExt
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.directives.admonitions.BaseAdmonition
A
todoext
entry, displayed in the form of an admonition. It takes the following options:title: a title for the todo (mandatory)
tag: a tag to have several categories of todo (mandatory)
issue: the issue requires extlinks to be defined and must contain key
'issue'
(optional)cost: a cost if the todo were to be fixed (optional)
priority: to prioritize items (optional)
hidden: if true, the todo does not appear where it is inserted but it will with a todolist (optional)
date: date (optional)
release: release number (optional)
Example:
.. todoext:: :title: title for the todo :tag: issue :issue: issue number Description of the todo
If the option
issue
is filled, the configuration must contain a key inextlinks
:- extlinks=dict(issue=(‘https://link/%s’,
‘issue {0} on somewhere’)))
-
node_class
[source]¶ alias of
pyquickhelper.sphinxext.sphinx_todoext_extension.todoext_node
-
class
pyquickhelper.sphinxext.sphinx_todoext_extension.
TodoExtList
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.Directive
A list of all todoext entries, for a specific tag.
tag: a tag to have several categories of todoext
Example:
.. todoextlist:: :tag: issue
-
pyquickhelper.sphinxext.sphinx_todoext_extension.
depart_todoext_node
(self, node)[source]¶ depart_todoext_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py
-
pyquickhelper.sphinxext.sphinx_todoext_extension.
depart_todoextlist_node
(self, node)[source]¶ depart_todoext_node
-
pyquickhelper.sphinxext.sphinx_todoext_extension.
process_todoext_nodes
(app, doctree, fromdocname)[source]¶
-
pyquickhelper.sphinxext.sphinx_todoext_extension.
process_todoexts
(app, doctree)[source]¶ collect all todoexts in the environment this is not done in the directive itself because it some transformations must have already been run, e.g. substitutions
-
class
pyquickhelper.sphinxext.sphinx_todoext_extension.
todoext_node
(rawsource='', *children, **attributes)[source]¶ Bases:
docutils.nodes.admonition
Defines
todoext
node.
-
class
pyquickhelper.sphinxext.sphinx_todoext_extension.
todoextlist
(rawsource='', *children, **attributes)[source]¶ Bases:
docutils.nodes.General
,docutils.nodes.Element
Defines
todoextlist
node.
-
pyquickhelper.sphinxext.sphinx_todoext_extension.
visit_todoextlist_node
(self, node)[source]¶ see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py