Skip to content

Commit

Permalink
Update makefile with notebook_v3 target
Browse files Browse the repository at this point in the history
  • Loading branch information
vallsv committed Mar 14, 2017
1 parent 39035c4 commit 030baf3
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions silx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@ SLIDES = introduction io plot processing conclusion

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

.PHONY: clean html pdf png
NOTEBOOK_V3_FROM_NOTEBOOK=$(shell find | grep '\.ipynb$$' | grep -v '\.v3\.' | grep -v '\.ipynb_checkpoints' | sed -e 's/ipynb$$/v3.ipynb/g')


.PHONY: clean html pdf png notebook_v3

#
# RESOURCES
#

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

png: $(PNGS_FROM_SVGS)

#
# SLIDES
#

build/html/%.html: %/index.rst png
@mkdir -p build/html
cd $(dir $<);landslide --embed -d ../$@ index.rst
Expand All @@ -16,14 +29,26 @@ build/pdf/%.pdf: %/index.rst
@mkdir -p build/pdf
cd $(dir $<);landslide -d ../$@ index.rst

png: $(PNGS_FROM_SVGS)

html: $(patsubst %,build/html/%.html, $(SLIDES))

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

pdf: build/pdf/slides.pdf

#
# NOTEBOOK
#

%.v3.ipynb: %.ipynb
echo $<
jupyter nbconvert --to notebook --nbformat 3 $<

notebook_v3: $(NOTEBOOK_V3_FROM_NOTEBOOK)

#
# CLEAN
#

clean:
@rm -rf build

0 comments on commit 030baf3

Please sign in to comment.