-
Notifications
You must be signed in to change notification settings - Fork 383
/
Makefile
75 lines (64 loc) · 3.02 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
all_markdown: markdown/modern_1_intro.md \
markdown/modern_2_method_chaining.md \
markdown/modern_3_indexes.md \
markdown/modern_4_performance.md \
markdown/modern_5_tidy.md \
markdown/modern_6_visualization.md \
markdown/modern_7_timeseries.md
all_markdown_processed: markdown/modern_1_intro_processed.md \
markdown/modern_2_method_chaining_processed.md \
markdown/modern_3_indexes_processed.md \
markdown/modern_4_performance_processed.md \
markdown/modern_5_tidy_processed.md \
markdown/modern_6_visualization_processed.md \
markdown/modern_7_timeseries_processed.md
markdown/modern.epub: all_markdown_processed markdown/style.css
cd markdown && \
pandoc -f markdown-markdown_in_html_blocks --epub-cover-image=../cover/modern-pandas-cover.png --epub-stylesheet=style.css --chapters -S -o $(notdir $@) \
title.txt \
modern_1_intro_processed.md \
modern_2_method_chaining_processed.md \
modern_3_indexes_processed.md \
modern_4_performance_processed.md \
modern_5_tidy_processed.md \
modern_6_visualization_processed.md \
modern_7_timeseries_processed.md
# markdown/modern_8_out_of_core.md \
markdown/modern.pdf: all_markdown_processed
cd markdown && \
pandoc -f markdown-markdown_in_html_blocks -V documentclass=memoir --chapters -S --latex-engine=xelatex --toc --template=$(HOME)/.pandoc/templates/default.latex -o $(notdir $@) \
title.txt \
modern_1_intro_processed.md \
modern_2_method_chaining_processed.md \
modern_3_indexes_processed.md \
modern_4_performance_processed.md \
modern_5_tidy_processed.md \
modern_6_visualization_processed.md \
modern_7_timeseries_processed.md
markdown/%.md: %.ipynb
jupyter nbconvert --execute --allow-errors --ExecutePreprocessor.timeout=9999999 --to=markdown --output=$(basename $(notdir $@)) $<
$(eval BASE:=$(basename $(notdir $@)))
if [ -d $(BASE)_files ]; then \
rm -rf markdown/$(BASE)_files; \
fi
if [ -d $(BASE)_files ]; then \
mv $(BASE)_files markdown/$(BASE)_files;\
fi
mv $(BASE).md $@
markdown/%_processed.md: markdown/%.md
pandoc -f markdown-markdown_in_html_blocks $< | pandoc -f html -t markdown+pipe_tables -o $@
markdown/sample.epub: markdown/modern_1_intro_processed.md
cd markdown && \
pandoc -f markdown-markdown_in_html_blocks --epub-cover-image=../cover/modern-pandas-cover.png --epub-stylesheet=style.css --chapters -S -o $(notdir $@) \
title.txt \
modern_1_intro_processed.md
markdown/sample.pdf: markdown/modern_1_intro_processed.md
cd markdown && \
pandoc -f markdown-markdown_in_html_blocks -V documentclass=memoir -S --latex-engine=xelatex --template=$(HOME)/.pandoc/templates/default.latex -o $(notdir $@) \
title.txt \
modern_1_intro_processed.md
test.epub: markdown/modern_1_intro_processed.md
cd markdown && \
pandoc -f markdown-markdown_in_html_blocks $(notdir $<) | pandoc -f html -t markdown+pipe_tables -o test_processed.md && \
pandoc -f markdown-markdown_in_html_blocks --epub-cover-image=../cover/modern-pandas-cover.png --epub-stylesheet=style.css --chapters -S -o $(notdir $@) \
test_processed.md