-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
40 lines (32 loc) · 975 Bytes
/
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
EBOOKNAME = The-Uncanny
default : index.html $(EBOOKNAME).mobi
web.css : styles/index.css styles/html.css
cat styles/index.css > web.css && cat styles/html.css >> web.css
index.html : $(EBOOKNAME).md web.css filters/* template.t
pandoc \
-s \
--filter filters/hyphenate.py \
--section-divs \
-o index.html \
-c web.css \
--template template.t \
$(EBOOKNAME).md
ebook.css : styles/index.css styles/epub.css
cat styles/index.css > ebook.css && cat styles/epub.css >> ebook.css
$(EBOOKNAME).epub : $(EBOOKNAME).md ebook.css filters/* template.t
pandoc \
-s \
--filter filters/hyphenate.py \
--section-divs \
--toc-depth=1 \
-o $(EBOOKNAME).epub \
-c ebook.css \
--template template.t \
-t epub3 \
$(EBOOKNAME).md
$(EBOOKNAME).mobi : $(EBOOKNAME).epub
kindlegen $(EBOOKNAME).epub || true
watch :
ls $(EBOOKNAME).md styles/* template.t filters/* | entr make index.html
clean :
$(RM) $(EBOOKNAME).mobi $(EBOOKNAME).epub index.html ebook.css web.css