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 |
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 |
---|---|
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:
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 %s on somewhere’)))
- node_class[source]¶
alias of
todoext_node
- option_spec = {'class': <function class_option>, 'cost': <function unchanged>, 'date': <function unchanged>, 'hidden': <function unchanged>, 'index': <function unchanged>, 'issue': <function unchanged>, 'priority': <function unchanged>, 'release': <function unchanged>, 'tag': <function unchanged>, 'title': <function unchanged>}[source]¶
Mapping of option names to validator functions.
- class pyquickhelper.sphinxext.sphinx_todoext_extension.TodoExtList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
Bases:
Directive
A list of all todoext entries, for a specific tag.
tag: a tag to have several categories of todoext
Example:
.. todoextlist:: :tag: issue
- option_spec = {'sort': <function unchanged>, 'tag': <function unchanged>}[source]¶
Mapping of option names to validator functions.
- 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:
admonition
Defines
todoext
node.
- class pyquickhelper.sphinxext.sphinx_todoext_extension.todoextlist(rawsource='', *children, **attributes)[source]¶
Bases:
General
,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