sphinx_gallery.notebook¶
Parser for Jupyter notebooks¶
Class that holds the Jupyter notebook information
Functions¶
-
sphinx_gallery.notebook.
add_code_cell
(work_notebook, code)[source]¶ Add a code cell to the notebook
- Parameters
code (str) – Cell content
Examples using sphinx_gallery.notebook.add_code_cell
¶
Examples using sphinx_gallery.notebook.add_markdown_cell
¶
Examples using sphinx_gallery.notebook.directive_fun
¶
Examples using sphinx_gallery.notebook.fill_notebook
¶
Examples using sphinx_gallery.notebook.generate_image_src
¶
Examples using sphinx_gallery.notebook.jupyter_notebook
¶
Examples using sphinx_gallery.notebook.jupyter_notebook_skeleton
¶
Examples using sphinx_gallery.notebook.python_to_jupyter_cli
¶
-
sphinx_gallery.notebook.
rst2md
(text, gallery_conf, target_dir, heading_levels)[source]¶ Converts the RST text from the examples docstrings and comments into markdown text for the Jupyter notebooks
- Parameters
text (str) – RST input to be converted to MD
gallery_conf (dict) – The sphinx-gallery configuration dictionary.
target_dir (str) – Path that notebook is intended for. Used where relative paths may be required.
heading_levels (dict) – Mapping of heading style
(over_char, under_char)
to heading level. Note thatover_char
is None when only underline is present.