Skip to content

Commit 030baf3

Browse files
committed
Update makefile with notebook_v3 target
1 parent 39035c4 commit 030baf3

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

silx/Makefile

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,24 @@ SLIDES = introduction io plot processing conclusion
33

44
PNGS_FROM_SVGS=$(shell find | grep \\.svg | sed -e 's/svg$$/png/g')
55

6-
.PHONY: clean html pdf png
6+
NOTEBOOK_V3_FROM_NOTEBOOK=$(shell find | grep '\.ipynb$$' | grep -v '\.v3\.' | grep -v '\.ipynb_checkpoints' | sed -e 's/ipynb$$/v3.ipynb/g')
7+
8+
9+
.PHONY: clean html pdf png notebook_v3
10+
11+
#
12+
# RESOURCES
13+
#
714

815
%.png: %.svg
916
inkscape -z $< -e $@
1017

18+
png: $(PNGS_FROM_SVGS)
19+
20+
#
21+
# SLIDES
22+
#
23+
1124
build/html/%.html: %/index.rst png
1225
@mkdir -p build/html
1326
cd $(dir $<);landslide --embed -d ../$@ index.rst
@@ -16,14 +29,26 @@ build/pdf/%.pdf: %/index.rst
1629
@mkdir -p build/pdf
1730
cd $(dir $<);landslide -d ../$@ index.rst
1831

19-
png: $(PNGS_FROM_SVGS)
20-
2132
html: $(patsubst %,build/html/%.html, $(SLIDES))
2233

2334
build/pdf/slides.pdf: $(patsubst %,build/pdf/%.pdf, $(SLIDES))
2435
pdfunite $^ $@
2536

2637
pdf: build/pdf/slides.pdf
2738

39+
#
40+
# NOTEBOOK
41+
#
42+
43+
%.v3.ipynb: %.ipynb
44+
echo $<
45+
jupyter nbconvert --to notebook --nbformat 3 $<
46+
47+
notebook_v3: $(NOTEBOOK_V3_FROM_NOTEBOOK)
48+
49+
#
50+
# CLEAN
51+
#
52+
2853
clean:
2954
@rm -rf build

0 commit comments

Comments
 (0)