sphinx_gallery.downloads

Utilities for downloadable items

Functions

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

Collects all Python source files and Jupyter notebooks in gallery_dir and makes zipfiles of them

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

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

Returns

download_rst – RestructuredText to include download buttons to the generated files

Return type

str