forked from cloudmesh/technologies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
101 lines (77 loc) · 2.98 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
INDEX=\
./dest/chapters/preface/todo.md\
./dest/chapters/preface/preface.md\
./dest/chapters/preface/format.md\
./dest/chapters/preface/contributors.md\
./README.md\
./template/technologies.md\
./dest/all.md\
./template/incomming.md\
./dest/incomming.md\
./template/refernces.md
MARKDOWN-OPTIONS=--verbose -f markdown+smart -f markdown+emoji --indented-code-classes=bash,python,yaml
CSL=--csl=template/ieee-with-url.csl
FORMAT=--toc --number-sections
FONTS=--epub-embed-font='fonts/*.ttf'
BIB=--bibliography dest/all.bib
CSS=--css=template/epub.css
epub: tech
pandoc $(MARKDOWN-OPTIONS) $(FORMAT) $(FONTS) $(BIB) $(CSL) $(CSS) --reference-location=block -o vonLaszewski-cloud-technologies.epub metadata.txt $(INDEX)
view:
open vonLaszewski-cloud-technologies.epub
tech:
mkdir -p dest
bin/markup-all.py
cat dest/chapters/tech/*.md > dest/all.md
find dest/chapters/incomming/*.md | xargs -I{} sh -c "cat {}; echo ''" > dest/incomming.md
cat chapters/incomming/*.bib > dest/incomming.bib
cat bib/*.bib dest/incomming.bib > dest/all.bib
html:
pandoc $(MARKDOWN-OPTIONS) $(FORMAT) $(FONTS) $(BIB) $(CSL) -o vonLaszewski-cloud-technologies.html metadata.txt $(INDEX)
pdf:
pandoc -f markdown+smart --toc --epub-embed-font='fonts/*.ttf' -V geometry:margin=1in --bibliography refernces.bib --csl=ieee.csl -o vonLaszewski-cloud-technologies.pdf metadata.txt $(INDEX)
tex:
pandoc -f markdown+smart -f markdown+emoji --toc --epub-embed-font='fonts/*.ttf' --bibliography refernces.bib --csl=ieee.csl -o vonLaszewski-cloud-technologies.tex metadata.txt $(INDEX)
pdflatex content.tex
clean:
rm -rf vonLaszewski-cloud-technologies.*
rm -rf dest
list:
@echo "----"
@find . -name "*.md"
@echo "----"
@echo "Markdown Files": `find . -name "*.md" | wc -l`
@echo "----"
@find . -name "*.md" | sed -e 's/^/ /' | sed 's/$$/\\/'
publish:
git commit -m "update" vonLaszewski-cloud-technologies.epub
git push
chars:
grep -R -n '>"' chapters/*/*.md || true
grep -R -n "“" chapters/*/*.md || true
grep -R -n "”" chapters/*/*.md || true
grep -R -n "…" chapters/*/*.md || true
grep -R -n "“" bib/*.bib || true
grep -R -n "”" bib/*.bib|| true
grep -R -n "…" bib/*.bib|| true
$(if $(shell grep -R '>"' chapters/*/*.md), @false, @true)
$(if $(shell grep -R "“" chapters/*/*.md), @false, @true)
$(if $(shell grep -R "”" chapters/*/*.md), @false, @true)
$(if $(shell grep -R "“" bib/*.bib), @false, @true)
$(if $(shell grep -R "”" bib/*.bib), @false, @true)
# $(if $(shell grep -R "…" chapters/*/*.md), @false, @trie)
# $(if $(shell grep -R "…" bib/*.bib), @true, @false)
image:
docker build -t cloudmesh/technologies:1.3 .
image-push:
docker push cloudmesh/technologies
shell:
docker run --rm -it cloudmesh/technologies:1.3 /bin/bash
docker-clean:
-docker kill $$(docker ps -q)
-docker rm $$(docker ps -a -q)
-docker rmi $$(docker images -q)
docker-push:
docker push cloudmesh/technologies:1.3
run:
docker run cloudmesh/technologies:1.3 /bin/sh -c "cd technologies; git pull; make"