-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (49 loc) · 1.62 KB
/
Makefile
File metadata and controls
55 lines (49 loc) · 1.62 KB
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
APT_INSTALL?=env DEBIAN_FRONTEND=noninteractive apt --yes --no-install-recommends install
GIT_MESSAGE?="UPDATED"
fmt:
cp README.md README.md.back
sed '/^Introduction$$/,$$!d' README.md.back > README.md
pandoc --standalone --columns=80 --markdown-headings=setext --tab-stop=2 --to=gfm --toc --toc-depth=2 README.md -o README.fmt.md
mv README.fmt.md README.md
spell:
hunspell -H -p ./.hunspell_dict ./README.md
html: # based on https://github.com/jez/pandoc-markdown-css-theme
pandoc README.md \
--output gh-pages/index.html \
--standalone \
--table-of-contents \
--toc-depth=3 \
--number-sections \
--to html5+smart \
--embed-resources \
--template=gh-pages/template.html5 \
--css gh-pages/theme.css \
--css gh-pages/skylighting-solarized-theme.css \
--wrap=none \
--variable=date:"DATE: `date '+%Y-%m-%d'`" \
--variable=author:"VERSION: `git describe --broken --dirty --always`" \
--metadata title="Code Incomplete"
ghpages:
cd gh-pages; git checkout gh-pages
${MAKE} html
cd gh-pages; git add *; git commit -a -m "${GIT_MESSAGE}"; git push
ghpages_action:
sudo apt update
sudo ${APT_INSTALL} pandoc
${MAKE} ghpages
pdf:
pandoc README.md \
--output codeincomplete.pdf \
--standalone \
--table-of-contents \
--toc-depth=3 \
--number-sections \
--from gfm \
--to pdf \
--wrap=none \
-V geometry:a4paper \
-V geometry:margin=2.5cm \
-V fontsize=12pt \
--variable=date:"DATE: `date '+%Y-%m-%d'`" \
--variable=author:"VERSION: `git describe --broken --dirty --always`" \
--metadata title="Code Incomplete"