-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 808 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 808 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
31
32
33
# vim: set ts=8 sts=0 sw=8 si fenc=utf-8 noet:
# vim: set fdm=marker fmr={{{,}}} fdl=0 foldcolumn=4:
# Authors: BP
# Maintainers: BP
# Copyright: 2025 HRDAG, GPL v2 or later
# =========================================
SRC_DIR := notebooks
intro := $(SRC_DIR)/data_story_story-pj.ipynb
nb1 := $(SRC_DIR)/what-is-an-mp-event-nb1-pj.ipynb
nb2 := $(SRC_DIR)/what-happens-after-mp-event-nb2-pj.ipynb
SOURCES := $(intro) $(nb1) $(nb2)
OUT_DIR := output
CHAPTERS := $(patsubst $(SRC_DIR)/%.ipynb, $(OUT_DIR)/%.html, $(SOURCES))
.PHONY: all clean
all: $(CHAPTERS)
clean:
-rm $(OUT_DIR)/*
$(OUT_DIR)/%.html: $(SRC_DIR)/%.ipynb | $(OUT_DIR)
jupyter nbconvert --to notebook --inplace --execute $<
jupyter nbconvert --to html --template pj $<
mv notebooks/$*.html $@
$(OUT_DIR):
mkdir -p $@
# done.