-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 669 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Makefile
# convert .jl to .ipynb to .html
# key commands:
root = ~/.julia/conda/3/bin/
jt = $(root)/jupytext
jup = $(root)/jupyter
# --allow-errors
juprun = $(jup) nbconvert --execute \
--config=config/jupyter_nbconvert_config.py
juphtm = $(juprun) --to HTML
# https://nbconvert.readthedocs.io/
# https://nbconvert.readthedocs.io/en/latest/usage.html
# https://nbconvert.readthedocs.io/en/latest/execute_api.html?highlight=execute#module-nbconvert.preprocessors
jl := $(wildcard */*.jl)
ip := $(jl:%.jl=%.ipynb)
ht := $(jl:%.jl=%.html)
all: $(ip) $(ht)
$(ip): %.ipynb: %.jl
$(jt) --to notebook $? # -o $@
$(ht): %.html: %.ipynb
$(juphtm) $? # --output $@