Add ability to compile notebooks to restructured text.

Jonathan Frederic 11 years ago
parent 4671bb9cb7
commit a0e20c7706

@ -19,7 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext ipynb2rst
help:
@echo "Please use \`make <target>' where <target> is one of"
@ -52,7 +52,7 @@ clean:
rm -rf $(BUILDDIR)/*
rm -rf source/config.rst
html: source/config.rst
html: source/config.rst ipynb2rst
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@ -61,6 +61,10 @@ source/config.rst:
python3 autogen_config.py
@echo "Created docs for config options"
ipynb2rst:
jupyter nbconvert --to rst source/examples/Notebook/*.ipynb --FilesWriter.build_directory=source/examples/Notebook
@echo "Converted notebooks to rst"
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo

Loading…
Cancel
Save