diff options
Diffstat (limited to 'compile.sh')
-rw-r--r-- | compile.sh | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/compile.sh b/compile.sh deleted file mode 100644 index 51a94f7..0000000 --- a/compile.sh +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | num=0 | ||
2 | for file in src/{.[!.]*,*}.txt; do | ||
3 | # TODO: change this to work with globs & args & stuff | ||
4 | echo -n "Compiling $file to HTML5" | ||
5 | pandoc -f markdown \ | ||
6 | -t html5 \ | ||
7 | --template=.template.html \ | ||
8 | --smart \ | ||
9 | --mathml \ | ||
10 | "$file" \ | ||
11 | -o "${file%.txt}.html" | ||
12 | echo -n " & RIVER ..." | ||
13 | pandoc -f markdown \ | ||
14 | -t lua/river.lua \ | ||
15 | "$file" \ | ||
16 | -o "${file%.txt}.river" | ||
17 | echo " Done." | ||
18 | ((num += 1)) | ||
19 | done | ||
20 | |||
21 | echo | ||
22 | echo "Moving files to build directory ..." | ||
23 | mv src/{.[!.]*,*}.html ./ | ||
24 | echo "Moving RIVERs to river/ ..." | ||
25 | mv src/*.river river/ | ||
26 | rm src/*.river | ||
27 | echo "Concatenating and counting rivers ..." | ||
28 | cat river/*.river | \ | ||
29 | sort | uniq -c | sort >river/COUNTS.txt | ||
30 | echo "Finished compiling $num files." | ||
31 | ############################################### | ||
32 | echo | ||
33 | echo "Updating js/lozenge.js with file list ..." | ||
34 | |||
35 | lozengeList=( $(ls *.html) ) | ||
36 | |||
37 | list=$(sed -e 's/\S\+\.html/"&",/g' -e 's/,$//' -e 's/^.*$/var files=[&]/' <<< "${lozengeList[@]}") | ||
38 | |||
39 | sed -i "s/var files=.*/$list/" js/lozenge.js | ||
40 | |||
41 | echo "Finished updating: ${#lozengeList[@]} files." | ||