module sphinxext.sphinx_todoext_extension

Inheritance diagram of pyquickhelper.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.

source on GitHub

Classes

class

truncated documentation

TodoExt

A todoext entry, displayed in the form of an admonition. It takes the following options:

todoext_node

Defines todoext node.

TodoExtList

A list of all todoext entries, for a specific tag.

todoextlist

Defines todoextlist node.

Functions

function

truncated documentation

depart_todoext_node

depart_todoext_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_todoextlist_node

depart_todoext_node

merge_todoext

merge_todoext

process_todoext_nodes

process_todoext_nodes

process_todoexts

collect all todoexts in the environment this is not done in the directive itself because it some transformations …

purge_todosext

purge_todosext

setup

Setup for todoext (sphinx).

visit_todoext_node

visit_todoext_node

visit_todoextlist_node

visit_todoextlist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

Methods

method

truncated documentation

run

builds the todo text

run

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.

source on GitHub

class pyquickhelper.sphinxext.sphinx_todoext_extension.TodoExt(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][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 in extlinks:

extlinks=dict(issue=(‘https://link/%s’,

‘issue {0} on somewhere’)))

source on GitHub

node_class[source]

alias of todoext_node

run()[source][source]

builds the todo text

source on GitHub

class pyquickhelper.sphinxext.sphinx_todoext_extension.TodoExtList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][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

source on GitHub

run()[source][source]

Simply insert an empty todoextlist node which will be replaced later when process_todoext_nodes is called

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.depart_todoext_node(self, node)[source][source]

depart_todoext_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.depart_todoextlist_node(self, node)[source][source]

depart_todoext_node

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.merge_todoext(app, env, docnames, other)[source][source]

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.process_todoext_nodes(app, doctree, fromdocname)[source][source]

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.process_todoexts(app, doctree)[source][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

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.purge_todosext(app, env, docname)[source][source]

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.setup(app)[source][source]

Setup for todoext (sphinx).

source on GitHub

class pyquickhelper.sphinxext.sphinx_todoext_extension.todoext_node(rawsource='', *children, **attributes)[source][source]

Bases: docutils.nodes.admonition

Defines todoext node.

source on GitHub

__slotnames__ = [][source]
class pyquickhelper.sphinxext.sphinx_todoext_extension.todoextlist(rawsource='', *children, **attributes)[source][source]

Bases: docutils.nodes.General, docutils.nodes.Element

Defines todoextlist node.

source on GitHub

__slotnames__ = [][source]
pyquickhelper.sphinxext.sphinx_todoext_extension.visit_todoext_node(self, node)[source][source]

source on GitHub

pyquickhelper.sphinxext.sphinx_todoext_extension.visit_todoextlist_node(self, node)[source][source]

see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

source on GitHub