Commit 371d6d1a authored by paugier's avatar paugier
Browse files

Add notebooks + better index page

parent 793b1824
Pipeline #49900 failed with stage
in 24 seconds
......@@ -16,4 +16,6 @@ ipynb/index.html
.vscode
TP/TP2_package/mypackuga/build
TP/TP2_package/mypackuga/dist
\ No newline at end of file
TP/TP2_package/mypackuga/dist
ipynb/index.rst
......@@ -2,6 +2,9 @@ IPYNBDIR := ipynb
IPYNBFILES := $(shell find $(IPYNBDIR) -name '*.ipynb' | grep -v ipynb_checkpoints)
IPYNBPRES = $(addsuffix .slides.html, $(basename $(IPYNBFILES)))
# TPL_FILE = ipynb/slides_reveal_wide.tpl
TPL_FILE = ipynb/slides_reveal.tpl
define STR_HELP
This makefile can be used for
......@@ -17,7 +20,7 @@ endef
export STR_HELP
.PHONY: help lab serve presentations
.PHONY: help lab serve presentations ipynb/index.rst
help:
@echo "$$STR_HELP"
......@@ -25,18 +28,22 @@ help:
clean:
rm -f ipynb/*.slides.html
rm -f ipynb/index.html
rm -rf ipynb/tmp
lab:
jupyter-lab
ipynb/index.rst:
python3 ipynb/make_index.py
ipynb/index.html: ipynb/index.rst
cd $(IPYNBDIR) && rst2html5 index.rst > index.html
%.slides.html: %.ipynb ipynb/slides_reveal_wide.tpl
jupyter-nbconvert $< --reveal-prefix='./reveal.js' --to slides --template ipynb/slides_reveal_wide.tpl
%.slides.html: %.ipynb $(TPL_FILE)
jupyter-nbconvert $< --reveal-prefix='./reveal.js' --to slides --template $(TPL_FILE)
presentations: $(IPYNBPRES) ipynb/index.html
echo $(IPYNBPRES)
presentations: ipynb/index.html $(IPYNBPRES)
@echo $(IPYNBPRES)
serve: $(IPYNBPRES) ipynb/index.html
cd $(IPYNBDIR) && python3 -m http.server 9000
cd $(IPYNBDIR) && python3 -m http.server
This diff is collapsed.