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

Properties

property

truncated documentation

document

Return the document root node of the tree containing this Node.

document

Return the document root node of the tree containing this Node.

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]

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 in extlinks:

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

‘issue %s on somewhere’)))

source on GitHub

final_argument_whitespace = False[source]

May the final argument contain whitespace?

has_content = True[source]

May the directive have content?

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.

optional_arguments = 0[source]

Number of optional arguments after the required arguments.

required_arguments = 0[source]

Number of required directive arguments.

run()[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]

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

source on GitHub

final_argument_whitespace = False[source]

May the final argument contain whitespace?

has_content = False[source]

May the directive have content?

option_spec = {'sort': <function unchanged>, 'tag': <function unchanged>}[source]

Mapping of option names to validator functions.

optional_arguments = 0[source]

Number of optional arguments after the required arguments.

required_arguments = 0[source]

Number of required directive arguments.

run()[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]

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]

depart_todoext_node

source on GitHub

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

source on GitHub

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

source on GitHub

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

source on GitHub

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

source on GitHub

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

Setup for todoext (sphinx).

source on GitHub

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

Bases: admonition

Defines todoext node.

source on GitHub

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

Bases: General, Element

Defines todoextlist node.

source on GitHub

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

source on GitHub

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

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

source on GitHub