module sphinxext.sphinx_ext_helper

Inheritance diagram of pyquickhelper.sphinxext.sphinx_ext_helper

Short summary

module pyquickhelper.sphinxext.sphinx_ext_helper

Few helpers for Sphinx.

source on GitHub

Classes

class

truncated documentation

NodeEnter

Returned by function traverse().

NodeLeave

Returned by function traverse().

TinyNode

Returned by traverse().

WrappedNode

Wraps a docutils node.

Functions

function

truncated documentation

info_blocref

Log information with Sphinx.

sphinx_lang

Returns the language defined in the configuration file.

traverse

Enumerates through all children but insert a node whenever digging or leaving the childrens nodes.

Methods

method

truncated documentation

__init__

Create a note

__init__

Create a note

__init__

Create a note

__init__

Documentation

Few helpers for Sphinx.

source on GitHub

class pyquickhelper.sphinxext.sphinx_ext_helper.NodeEnter(parent)[source][source]

Bases: pyquickhelper.sphinxext.sphinx_ext_helper.TinyNode

Returned by function traverse.

source on GitHub

Create a note

Parameters

parent – parent node

source on GitHub

class pyquickhelper.sphinxext.sphinx_ext_helper.NodeLeave(parent)[source][source]

Bases: pyquickhelper.sphinxext.sphinx_ext_helper.TinyNode

Returned by function traverse.

source on GitHub

Create a note

Parameters

parent – parent node

source on GitHub

class pyquickhelper.sphinxext.sphinx_ext_helper.TinyNode(parent)[source][source]

Bases: object

Returned by traverse.

source on GitHub

Create a note

Parameters

parent – parent node

source on GitHub

__init__(parent)[source][source]

Create a note

Parameters

parent – parent node

source on GitHub

class pyquickhelper.sphinxext.sphinx_ext_helper.WrappedNode(node)[source][source]

Bases: object

Wraps a docutils node.

source on GitHub

__init__(node)[source][source]

Initialize self. See help(type(self)) for accurate signature.

pyquickhelper.sphinxext.sphinx_ext_helper.info_blocref(app, doctree, fromdocname, class_name, entry_name, class_node, class_node_list)[source][source]

Log information with Sphinx.

Parameters
  • app – application (Sphinx)

  • doctree – document tree

  • fromdocname – document currently being compiled

  • class_name – name of the node

  • entry_name – entry name in TITLES

  • class_node – class node (blocref_node)

  • class_node_list – class node list (blocreflist)

source on GitHub

pyquickhelper.sphinxext.sphinx_ext_helper.sphinx_lang(env, default_value='en')[source][source]

Returns the language defined in the configuration file.

Parameters
  • env – environment

  • default_value – default value

Returns

language

source on GitHub

pyquickhelper.sphinxext.sphinx_ext_helper.traverse(node, depth=0)[source][source]

Enumerates through all children but insert a node whenever digging or leaving the childrens nodes.

Parameters
  • node – node (from doctree)

  • depth – current depth

Returns

enumerate (depth, node)

NodeEnter and NodeLeave are returned whenever entering or leaving nodes.

source on GitHub