module sphinxext.sphinx_downloadlink_extension¶

Inheritance diagram of pyquickhelper.sphinxext.sphinx_downloadlink_extension

Short summary¶

module pyquickhelper.sphinxext.sphinx_downloadlink_extension

Defines a sphinx extension to show a link instead of downloading it. This extension does not work for Sphinx < 1.8.

Classes¶

class

truncated documentation

downloadlink_node

Defines download_reference node.

DownloadLinkFileCollector

Download files collector for sphinx.environment.

Functions¶

function

truncated documentation

copy_download_files

Copies all files mentioned with role downloadlink.

depart_downloadlink_node_html

Converts node downloadlink into html.

depart_downloadlink_node_latex

Does notthing.

depart_downloadlink_node_md

Converts node downloadlink into md.

depart_downloadlink_node_rst

Converts node downloadlink into rst.

depart_downloadlink_node_text

Does notthing.

process_downloadlink_role

Defines custom role downloadlink. The following instructions defines a link which can be displayed or hidden based …

setup

setup for bigger (sphinx)

visit_downloadlink_node_html

Converts node downloadlink into html.

visit_downloadlink_node_latex

Does notthing.

visit_downloadlink_node_md

Converts node downloadlink into md.

visit_downloadlink_node_rst

Converts node downloadlink into rst.

visit_downloadlink_node_text

Does notthing.

Methods¶

method

truncated documentation

check_attr

clear_doc

merge_other

process_doc

Process downloadable file paths.

Documentation¶

Defines a sphinx extension to show a link instead of downloading it. This extension does not work for Sphinx < 1.8.

New in version 1.8.

source on GitHub

class pyquickhelper.sphinxext.sphinx_downloadlink_extension.DownloadLinkFileCollector[source]¶

Bases: sphinx.environment.collectors.EnvironmentCollector

Download files collector for sphinx.environment.

source on GitHub

clear_doc(app, env, docname)[source]¶

Remove specified data of a document.

This method is called on the removal of the document.

merge_other(app, env, docnames, other)[source]¶

Merge in specified data regarding docnames from a different BuildEnvironment object which coming from a subprocess in parallel builds.

process_doc(app, doctree)[source]¶

Process downloadable file paths.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.copy_download_files(app, exc)[source]¶

Copies all files mentioned with role downloadlink.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_html(self, node)[source]¶

Converts node downloadlink into html.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_latex(self, node)[source]¶

Does notthing.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_md(self, node)[source]¶

Converts node downloadlink into md.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_rst(self, node)[source]¶

Converts node downloadlink into rst.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_text(self, node)[source]¶

Does notthing.

source on GitHub

class pyquickhelper.sphinxext.sphinx_downloadlink_extension.downloadlink_node(rawsource='', text='', *children, **attributes)[source]¶

Bases: docutils.nodes.reference

Defines download_reference node.

source on GitHub

__slotnames__ = [][source]¶
pyquickhelper.sphinxext.sphinx_downloadlink_extension.process_downloadlink_role(role, rawtext, text, lineno, inliner, options=None, content=None)[source]¶

Defines custom role downloadlink. The following instructions defines a link which can be displayed or hidden based on the output format. The following directive creates a link to page.html only for the HTML output, it also copies the files next to the source and not in the folder _downloads. The link does not push the user to download the file but to see it.

:downloadlink:`html::page.html`
Parameters
  • role – The role name used in the document.

  • rawtext – The entire markup snippet, with role.

  • text – The text marked with the role.

  • lineno – The line number where rawtext appears in the input.

  • inliner – The inliner instance that called us.

  • options – Directive options for customization.

  • content – The directive content for customization.

The role only works for Sphinx 1.8+.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.setup(app)[source]¶

setup for bigger (sphinx)

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_html(self, node)[source]¶

Converts node downloadlink into html.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_latex(self, node)[source]¶

Does notthing.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_md(self, node)[source]¶

Converts node downloadlink into md.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_rst(self, node)[source]¶

Converts node downloadlink into rst.

source on GitHub

pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_text(self, node)[source]¶

Does notthing.

source on GitHub

Logo

Links

  • Blog
  • Index
  • Module
  • API Summary

Contents

  • Tutorial
  • API Summary
  • Magic commands
  • Command lines
  • FAQ
  • Galleries
  • License
  • Contribute
  • Indexes
  • History

Information

  • FAQ
  • Glossary
  • README
  • Changes
  • License

Related Topics

  • Documentation overview
    • Indexes
      • All indexes
        • Modules
          • Previous: module sphinxext.sphinx_doctree_builder
          • Next: module sphinxext.sphinx_epkg_extension

This Page

  • Show Source
Powered by Sphinx 3.5.1 & Alabaster 0.7.12 | Page source