module sphinxext.sphinx_nbref_extension

Inheritance diagram of pyquickhelper.sphinxext.sphinx_nbref_extension

Short summary

module pyquickhelper.sphinxext.sphinx_nbref_extension

Defines a sphinx extension to keep track of nb.

source on GitHub

Classes

class

truncated documentation

NbRef

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

nbref_node

defines nbref ndoe

NbRefList

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

nbreflist

defines nbreflist node

Functions

function

truncated documentation

depart_nbref_node

depart_nbref_node, see sphinx/writers/html.py. …

depart_nbreflist_node

depart_nbref_node

merge_nbref

merge_nbref

process_nbref_nodes

process_nbref_nodes

process_nbrefs

Collect all nbref in the environment this is not done in the directive itself because it some transformations …

purge_nbrefs

purge_nbrefs

setup

setup for nbref (sphinx)

visit_nbref_node

visit_nbref_node

visit_nbreflist_node

visit_nbreflist_node, see sphinx/writers/html.py. …

Properties

property

truncated documentation

document

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

document

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

Methods

method

truncated documentation

run

calls run from BlocRef and add index entries by default

run

calls run from BlocRefList and add default tag if not present

Documentation

Defines a sphinx extension to keep track of nb.

source on GitHub

class pyquickhelper.sphinxext.sphinx_nbref_extension.NbRef(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: BlocRef

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

  • title: a title for the bloc

  • tag: a tag to have several categories of blocs, if not specified, it will be equal to nb

  • lid or label: a label to refer to

  • index: to add an additional entry to the index (comma separated)

See %encrypt_file for an example. All entries can be aggregated per tag with nbreflist:

.. nbreflist::
    :tag: dummy_example2
    :sort: title

It works the same way as BlocRef.

source on GitHub

node_class[source]

alias of nbref_node

run()[source]

calls run from BlocRef and add index entries by default

source on GitHub

class pyquickhelper.sphinxext.sphinx_nbref_extension.NbRefList(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: BlocRefList

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

  • tag: a tag to have several categories of nbref

  • contents: add a bullet list with links to added blocs

Example:

.. nbreflist::
    :tag: issue

source on GitHub

node_class[source]

alias of nbreflist

run()[source]

calls run from BlocRefList and add default tag if not present

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.depart_nbref_node(self, node)[source]

depart_nbref_node, see sphinx/writers/html.py.

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.depart_nbreflist_node(self, node)[source]

depart_nbref_node

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.merge_nbref(app, env, docnames, other)[source]

source on GitHub

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

Bases: admonition

defines nbref ndoe

source on GitHub

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

Bases: General, Element

defines nbreflist node

source on GitHub

__slotnames__ = [][source]
pyquickhelper.sphinxext.sphinx_nbref_extension.process_nbref_nodes(app, doctree, fromdocname)[source]

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.process_nbrefs(app, doctree)[source]

Collect all nbref 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_nbref_extension.purge_nbrefs(app, env, docname)[source]

source on GitHub

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

setup for nbref (sphinx)

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.visit_nbref_node(self, node)[source]

source on GitHub

pyquickhelper.sphinxext.sphinx_nbref_extension.visit_nbreflist_node(self, node)[source]

visit_nbreflist_node, see sphinx/writers/html.py.

source on GitHub