-
Notifications
You must be signed in to change notification settings - Fork 5
/
build
executable file
·27 lines (16 loc) · 1.17 KB
/
build
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
#!/bin/bash
function listing {
cp $2 $3;
echo "<div class='listingSrcCode'>" >> $3;
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.javascript .numberLines}" >> $3;
cat $1 >> $3;
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $3;
echo "</div>" >> $3;
}
listing ./examples/jsgui-demo.js jsgui-notes.md ./work/jsgui-src.md;
listing ./examples/tip-calculator.js tip-notes.md ./work/tip-src.md;
listing ./examples/school-data/school-report.mjs school-report-notes.md ./work/school-report-src.md;
listing ./examples/spells/spells.js spells-notes.md ./work/spells-src.md;
CHAPTERS="forward.md way_of_the_program.md variables.md functions.md assert-exercises.md ./work/tip-src.md conditionals.md iteration.md while.md strings.md arrays.md ./work/school-report-src.md school-data-exercises.md maps.md gui.md ./work/jsgui-src.md ./work/spells-src.md code-listings.md preface.md fdl-1.3.md";
pandoc -o ./docs/index.html --mathml --highlight-style zenburn -t html5 --template=tmpl/tmpl.html -s --toc --toc-depth=2 --section-divs -H ./tmpl/style.css $CHAPTERS;
# pandoc -o ./docs/tjs.epub --mathml -t epub --template=tmpl/tmpl.html -s --section-divs -H ./tmpl/style.css $CHAPTERS;