From a0e20c77064ea6d63d80205ea0a1979f7f4f929e Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Thu, 18 Jun 2015 13:03:34 -0700 Subject: [PATCH] Add ability to compile notebooks to restructured text. --- docs/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 66550b6d2..ec871c738 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 ' where 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