-
Notifications
You must be signed in to change notification settings - Fork 2
/
makedocs
executable file
·130 lines (117 loc) · 10.6 KB
/
makedocs
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/sh
# To generate PDFs that are somewhat OK you will need to have the Roboto and Roboto mono font families installed on your system
# https://fonts.google.com/specimen/Roboto
# https://fonts.google.com/specimen/Roboto+Mono
# Verify fonts are built:
if [ ! -e results/Harmattan-Regular.ttf ]
then
echo "Fonts must be built before rebuilding documentation."
exit 1
fi
# Update woff2 fonts needed in web/ folder to build PDFs
cp results/web/Harmattan-Regular.woff2 results/web/Harmattan-Bold.woff2 web/
echo "-----Rebuilding documentation..."
echo " >>> HTML (documentation/)"
echo " > index.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/index.md -o documentation/index.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > about.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/about.md -o documentation/about.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > allah.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/allah.md -o documentation/allah.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > charset.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/charset.md -o documentation/charset.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > design.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/design.md -o documentation/design.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > developer.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/developer.md -o documentation/developer.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > faq.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/faq.md -o documentation/faq.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > features.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/features.md -o documentation/features.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > history.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/history.md -o documentation/history.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > resources.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/resources.md -o documentation/resources.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > sample.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/sample.md -o documentation/sample.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > support.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/support.md -o documentation/support.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > versions.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/versions.md -o documentation/versions.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " > announcement.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/announcement.md -o documentation/announcement.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
echo " >>> PDF (documentation/pdf/)"
mkdir -p documentation/source/pdftemp
echo " > index.html > index.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/index.md -o documentation/source/pdftemp/index.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/index.html documentation/pdf/index.pdf
echo " > about.html > about.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/about.md -o documentation/source/pdftemp/about.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/about.html documentation/pdf/about.pdf
echo " > allah.html > allah.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/allah.md -o documentation/source/pdftemp/allah.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/allah.html documentation/pdf/allah.pdf
echo " > charset.html > charset.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/charset.md -o documentation/source/pdftemp/charset.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/charset.html documentation/pdf/charset.pdf
echo " > design.html > design.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/design.md -o documentation/source/pdftemp/design.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/design.html documentation/pdf/design.pdf
echo " > developer.html > developer.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/developer.md -o documentation/source/pdftemp/developer.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/developer.html documentation/pdf/developer.pdf
echo " > faq.html > faq.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/faq.md -o documentation/source/pdftemp/faq.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/faq.html documentation/pdf/faq.pdf
echo " > features.html > features.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/features.md -o documentation/source/pdftemp/features.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
# weasyprint does not currently handle "ky" or "wo" langauge tags, but requires three-letter tags instead:
sed -i -e s/lang=\"wo\"/lang=\"WLF\"/ -e s/lang=\"ky\"/lang=\"kir\"/ documentation/source/pdftemp/features.html
weasyprint documentation/source/pdftemp/features.html documentation/pdf/features.pdf
echo " > history.html > history.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/history.md -o documentation/source/pdftemp/history.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/history.html documentation/pdf/history.pdf
echo " > resources.html > resources.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/resources.md -o documentation/source/pdftemp/resources.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/resources.html documentation/pdf/resources.pdf
echo " > sample.html > sample.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/sample.md -o documentation/source/pdftemp/sample.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/sample.html documentation/pdf/sample.pdf
echo " > support.html > support.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/support.md -o documentation/source/pdftemp/support.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/support.html documentation/pdf/support.pdf
echo " > versions.html > versions.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/versions.md -o documentation/source/pdftemp/versions.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/versions.html documentation/pdf/versions.pdf
echo " > announcement.html > announcement.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/announcement.md -o documentation/source/pdftemp/announcement.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint documentation/source/pdftemp/announcement.html documentation/pdf/announcement.pdf
echo " >>> PRODUCT SITE MARKDOWN (documentation/source/productsite/)"
echo " > about.md"
python3 documentation/source/makepsmd.py documentation/source/about.md documentation/source/productsite/about.md -q
echo " > allah.md"
python3 documentation/source/makepsmd.py documentation/source/allah.md documentation/source/productsite/allah.md -q
echo " > charset.md"
python3 documentation/source/makepsmd.py documentation/source/charset.md documentation/source/productsite/charset.md -q
echo " > design.md"
python3 documentation/source/makepsmd.py documentation/source/design.md documentation/source/productsite/design.md -q
echo " > developer.md"
python3 documentation/source/makepsmd.py documentation/source/developer.md documentation/source/productsite/developer.md -q
echo " > faq.md"
python3 documentation/source/makepsmd.py documentation/source/faq.md documentation/source/productsite/faq.md -q
echo " > features.md"
python3 documentation/source/makepsmd.py documentation/source/features.md documentation/source/productsite/features.md -q
echo " > history.md"
python3 documentation/source/makepsmd.py documentation/source/history.md documentation/source/productsite/history.md -q
echo " > resources.md"
python3 documentation/source/makepsmd.py documentation/source/resources.md documentation/source/productsite/resources.md -q
echo " > sample.md"
python3 documentation/source/makepsmd.py documentation/source/sample.md documentation/source/productsite/sample.md -q
echo " > support.md"
python3 documentation/source/makepsmd.py documentation/source/support.md documentation/source/productsite/support.md -q
echo " > versions.md"
python3 documentation/source/makepsmd.py documentation/source/versions.md documentation/source/productsite/versions.md -q
echo " > announcement.md"
python3 documentation/source/makepsmd.py documentation/source/announcement.md documentation/source/productsite/announcement.md -q
echo " Markdown source for other pages is in separate repo"
echo "-----Completed!"