module sphinxext.sphinx_blog_extension

Inheritance diagram of pyquickhelper.sphinxext.sphinx_blog_extension

Short summary

module pyquickhelper.sphinxext.sphinx_blog_extension

Defines blogpost directives. See Tutorial: Writing a simple extension, Creating reStructuredText Directives

source on GitHub

Classes

class

truncated documentation

blogpost_node

Defines blogpost node.

blogpostagg_node

Defines blogpostagg node.

BlogPostDirective

Extracts information about a blog post described by a directive ``

BlogPostDirectiveAgg

same but for the same post in a aggregated pages

blogpostlist_node

defines blogpostlist node, unused, kept as example

BlogPostListDirective

unused, kept as example

Functions

function

truncated documentation

depart_blogpost_node

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

depart_blogpostagg_node

what to do when leaving a node blogpost, the function should have different behaviour, depending on the format, …

depart_blogpostagg_node_html

what to do when leaving a node blogpost, the function should have different behaviour, depending on the format, …

process_blogpost_nodes

unused, kept as example

purge_blogpost

unused, kept as example

setup

setup for blogpost (sphinx)

visit_blogpost_node

what to do when visiting a node blogpost the function should have different behaviour, depending on the format, …

visit_blogpostagg_node

what to do when visiting a node blogpost the function should have different behaviour, depending on the format, …

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.

document

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

Methods

method

truncated documentation

fill_node

Fills the content of the node.

fill_node

Fill the node of an aggregated page.

run

extracts the information in a dictionary and displays it if the environment is not null

run

extracts the information in a dictionary and displays it if the environment is not null

run

suffix_label

returns a suffix to add to a label, it should not be empty for aggregated pages

suffix_label

returns a suffix to add to a label, it should not be empty for aggregated pages

Documentation

Defines blogpost directives. See Tutorial: Writing a simple extension, Creating reStructuredText Directives

source on GitHub

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

Bases: Directive

Extracts information about a blog post described by a directive .. blogpost:: and modifies the documentation if env is not null. The directive handles the following options:

  • date: date of the blog (mandatory)

  • title: title (mandatory)

  • keywords: keywords, comma separated (mandatory)

  • categories: categories, comma separated (mandatory)

  • author: author (optional)

  • blog_background: can change the blog background (boolean, default is True)

  • lid or label: an id to refer to (optional)

source on GitHub

blogpost_class[source]

alias of blogpost_node

fill_node(node, env, tag, p, language_code, targetnode, sharepost)[source]

Fills the content of the node.

source on GitHub

final_argument_whitespace = True[source]

May the final argument contain whitespace?

has_content = True[source]

May the directive have content?

option_spec = {'author': <function unchanged>, 'blog_background': <function unchanged>, 'categories': <function unchanged>, 'date': <function unchanged>, 'keywords': <function unchanged>, 'label': <function unchanged>, 'lid': <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]

extracts the information in a dictionary and displays it if the environment is not null

Returns:

a list of nodes

source on GitHub

suffix_label()[source]

returns a suffix to add to a label, it should not be empty for aggregated pages

Returns:

str

source on GitHub

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

Bases: BlogPostDirective

same but for the same post in a aggregated pages

source on GitHub

blogpost_class[source]

alias of blogpostagg_node

fill_node(node, env, tag, p, language_code, targetnode, sharepost)[source]

Fill the node of an aggregated page.

source on GitHub

option_spec = {'author': <function unchanged>, 'blog_background': <function unchanged>, 'categories': <function unchanged>, 'date': <function unchanged>, 'keywords': <function unchanged>, 'rawfile': <function unchanged>, 'title': <function unchanged>}[source]

Mapping of option names to validator functions.

suffix_label()[source]

returns a suffix to add to a label, it should not be empty for aggregated pages

Returns:

str

source on GitHub

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

Bases: Directive

unused, kept as example

source on GitHub

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

Bases: Element

Defines blogpost node.

source on GitHub

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

Bases: Element

Defines blogpostagg node.

source on GitHub

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

Bases: General, Element

defines blogpostlist node, unused, kept as example

source on GitHub

pyquickhelper.sphinxext.sphinx_blog_extension.depart_blogpost_node(self, node)[source]

what to do when leaving a node blogpost 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_blog_extension.depart_blogpostagg_node(self, node)[source]

what to do when leaving a node blogpost, 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_blog_extension.depart_blogpostagg_node_html(self, node)[source]

what to do when leaving a node blogpost, 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_blog_extension.process_blogpost_nodes(app, doctree, fromdocname)[source]

unused, kept as example

source on GitHub

pyquickhelper.sphinxext.sphinx_blog_extension.purge_blogpost(app, env, docname)[source]

unused, kept as example

source on GitHub

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

setup for blogpost (sphinx)

source on GitHub

pyquickhelper.sphinxext.sphinx_blog_extension.visit_blogpost_node(self, node)[source]

what to do when visiting a node blogpost 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_blog_extension.visit_blogpostagg_node(self, node)[source]

what to do when visiting a node blogpost the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub