module sphinxext.sphinx_video_extension

Inheritance diagram of pyquickhelper.sphinxext.sphinx_video_extension

Short summary

module pyquickhelper.sphinxext.sphinx_video_extension

Defines a sphinx extension to add button to share a page

source on GitHub

Classes

class

truncated documentation

video_node

Defines video node.

VideoDirective

Adds video to a page. It can be done by adding

Functions

function

truncated documentation

_clean_value

depart_video_node_html

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_latex

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_rst

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_text

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

initialize_videos_directive

Initializes the video directives.

setup

setup for video (sphinx)

visit_video_node

Visits a video node. Copies the video.

Methods

method

truncated documentation

run

Runs the directive.

Documentation

Defines a sphinx extension to add button to share a page

source on GitHub

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

Bases: docutils.parsers.rst.Directive

Adds video to a page. It can be done by adding:

.. video:: filename.mp4
    :width: 400
    :height: 600

For latex, unit becomes pt. See latex units. Videos are not enabled on latex by default, option :latex: must be set up.

source on GitHub

run()[source][source]

Runs the directive.

Returns

a list of nodes

source on GitHub

video_class[source]

alias of video_node

pyquickhelper.sphinxext.sphinx_video_extension._clean_value(val)[source][source]
pyquickhelper.sphinxext.sphinx_video_extension.depart_video_node_html(self, node)[source][source]

What to do when leaving a node video the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_video_extension.depart_video_node_latex(self, node)[source][source]

What to do when leaving a node video the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_video_extension.depart_video_node_rst(self, node)[source][source]

What to do when leaving a node video the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_video_extension.depart_video_node_text(self, node)[source][source]

What to do when leaving a node video the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_video_extension.initialize_videos_directive(app)[source][source]

Initializes the video directives.

source on GitHub

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

setup for video (sphinx)

source on GitHub

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

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

Defines video node.

source on GitHub

pyquickhelper.sphinxext.sphinx_video_extension.visit_video_node(self, node)[source][source]

Visits a video node. Copies the video.

source on GitHub