module 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 |
---|---|
Defines download_reference node. |
|
Download files collector for sphinx.environment. |
Functions¶
function |
truncated documentation |
---|---|
Copies all files mentioned with role downloadlink. |
|
Converts node downloadlink into html. |
|
Does notthing. |
|
Converts node downloadlink into md. |
|
Converts node downloadlink into rst. |
|
Does notthing. |
|
Defines custom role downloadlink. The following instructions defines a link which can be displayed or hidden based … |
|
setup for |
|
Converts node downloadlink into html. |
|
Does notthing. |
|
Converts node downloadlink into md. |
|
Converts node downloadlink into rst. |
|
Does notthing. |
Properties¶
property |
truncated documentation |
---|---|
|
Return the document root node of the tree containing this Node. |
Methods¶
method |
truncated documentation |
---|---|
|
|
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.
- class pyquickhelper.sphinxext.sphinx_downloadlink_extension.DownloadLinkFileCollector[source]¶
Bases:
EnvironmentCollector
Download files collector for sphinx.environment.
- 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.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.copy_download_files(app, exc)[source]¶
Copies all files mentioned with role downloadlink.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_html(self, node)[source]¶
Converts node downloadlink into html.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_latex(self, node)[source]¶
Does notthing.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_md(self, node)[source]¶
Converts node downloadlink into md.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_rst(self, node)[source]¶
Converts node downloadlink into rst.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.depart_downloadlink_node_text(self, node)[source]¶
Does notthing.
- class pyquickhelper.sphinxext.sphinx_downloadlink_extension.downloadlink_node(rawsource='', text='', *children, **attributes)[source]¶
Bases:
reference
Defines download_reference node.
- 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+.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_html(self, node)[source]¶
Converts node downloadlink into html.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_latex(self, node)[source]¶
Does notthing.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_md(self, node)[source]¶
Converts node downloadlink into md.
- pyquickhelper.sphinxext.sphinx_downloadlink_extension.visit_downloadlink_node_rst(self, node)[source]¶
Converts node downloadlink into rst.