-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakedocs
executable file
·34 lines (27 loc) · 1.38 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
#!/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
echo "-----Rebuilding documentation..."
pdftemp=documentation/source/pdftemp
mkdir -p $pdftemp
# pdftemp=$(mktemp -d)
for markdown in documentation/source/*.md
do
topic=$(basename $markdown .md)
if [ $topic = "announcement" -o $topic = "productsite" ]
then
continue
fi
# echo " >>> HTML (documentation/)"
echo " > $topic.html"
pandoc -s -f markdown-smart --template documentation/source/template.html documentation/source/$topic.md -o documentation/$topic.html --lua-filter=documentation/source/pandocfilters/filter-html.lua
# echo " >>> PDF (documentation/pdf/)"
echo " > $topic.html > $topic.pdf"
pandoc -s -f markdown-smart --template documentation/source/templatepdf.html documentation/source/$topic.md -o $pdftemp/$topic.html --lua-filter=documentation/source/pandocfilters/filter-pdf.lua
weasyprint $pdftemp/$topic.html documentation/pdf/$topic.pdf
done
# echo " >>> PRODUCT SITE MARKDOWN (documentation/source/productsite/)"
echo " > singlepage.md"
python3 documentation/source/makepsmd.py documentation/source/productsite.md documentation/source/productsite/singlepage.md -q
echo "-----Completed!"