sphinx_gallery.downloads#

Utilities for downloadable items.

Functions#

sphinx_gallery.downloads.generate_zipfiles(gallery_dir, src_dir, gallery_conf)[source]#

Collects downloadable sources and makes zipfiles of them.

Collects all source files and Jupyter notebooks in gallery_dir.

Parameters:
  • gallery_dir (str) – path of the gallery to collect downloadable sources

  • src_dir (str) – The build source directory. Needed to make the reST paths relative.

  • gallery_conf (dict[str, Any]) – Sphinx-Gallery configuration dictionary

Returns:

download_rst – RestructuredText to include download buttons to the generated files

Return type:

str