@@ -6,8 +6,8 @@ LESSONS_DIR = lessons
6
6
GENERATED_LESSONS_DIR = book/lessons
7
7
8
8
_requirements.installed :
9
- pip install -q -r requirements.txt
10
- touch _requirements.installed
9
+ pip install -q -r requirements.txt
10
+ touch _requirements.installed
11
11
12
12
MARKDOWNS = $(wildcard $(LESSONS_DIR ) /* .md)
13
13
MD_OUTPUTS = $(patsubst $(LESSONS_DIR ) /% .md, $(GENERATED_LESSONS_DIR ) /% .md, $(MARKDOWNS ) )
@@ -16,25 +16,25 @@ NOTEBOOKS = $(patsubst %.md, %.ipynb, $(MD_OUTPUTS))
16
16
.SECONDARY : $(MD_OUTPUTS ) $(NOTEBOOKS )
17
17
18
18
$(GENERATED_LESSONS_DIR ) /% .ipynb :$(LESSONS_DIR ) /% .md book/lessons book/lessons/images
19
- # This does not work, due to bug in notedown; see https://github.com/aaren/notedown/issues/53
20
- # notedown --match=python --precode='%matplotlib inline' $< > $@
21
- notedown --match=python $< > $@
22
- jupyter nbconvert --execute --inplace $@ --ExecutePreprocessor.timeout=-1
19
+ # This does not work, due to bug in notedown; see https://github.com/aaren/notedown/issues/53
20
+ # notedown --match=python --precode='%matplotlib inline' $< > $@
21
+ notedown --match=python $< > $@
22
+ jupyter nbconvert --execute --inplace $@ --ExecutePreprocessor.timeout=-1
23
23
24
24
% .md :% .ipynb
25
- jupyter nbconvert --to=mdoutput --output="$(notdir $@)" --output-dir=$(GENERATED_LESSONS_DIR) $<
25
+ jupyter nbconvert --to=mdoutput --output=" $( notdir $@ ) " --output-dir=$(GENERATED_LESSONS_DIR ) $<
26
26
# $(eval NBSTRING := [📂 Download lesson notebook](.\/$(basename $(notdir $@)).ipynb)\n\n)
27
27
# sed -i'.bak' '1s/^/$(NBSTRING)/' $@
28
28
29
29
book/lessons :
30
- mkdir -p book/lessons
30
+ mkdir -p book/lessons
31
31
32
32
book/lessons/images :
33
- ln -s ${PWD}/lessons/images ${PWD}/book/lessons/images
33
+ ln -s ${PWD} /lessons/images ${PWD} /book/lessons/images
34
34
35
35
html : | _requirements.installed $(NOTEBOOKS ) $(MD_OUTPUTS )
36
- @export SPHINXOPTS=-W; make -C book html
37
- cp $(GENERATED_LESSONS_DIR)/*.ipynb book/build/html/lessons/
36
+ @export SPHINXOPTS=-W; make -C book html
37
+ cp $(GENERATED_LESSONS_DIR ) /* .ipynb book/build/html/lessons/
38
38
39
39
clean :
40
- rm -rf $(GENERATED_LESSONS_DIR)/*
40
+ rm -rf $(GENERATED_LESSONS_DIR ) /*
0 commit comments