forked from csev/py4e
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtmlbook.sh
More file actions
executable file
·31 lines (27 loc) · 884 Bytes
/
htmlbook.sh
File metadata and controls
executable file
·31 lines (27 loc) · 884 Bytes
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
#!/bin/bash
# Testfile
#cat trinket/test | python verbatim.py --trinket | pandoc -s -f markdown -t html --template=trinket/template --toc --default-image-extension=svg --css=../trinket/simplegrid.css -o html/test.html
# Clean directory
find html/. -type f -not -name 'figs2' | xargs rm
# Make a symlink to figs
#(cd html && ln -s ../figs2/)
# Convert all mkd into html
for fn in *.mkd; do
echo "the next file is $fn"
x=`basename $fn .mkd`
echo $x
cat $fn | \
python pre-html.py | \
tee tmp.html.pre.$x | \
python verbatim.py --trinket --files | \
tee tmp.html.verbatim.$x | \
python consoles.py | \
pandoc -s --self-contained \
-f markdown -t html \
--template=trinket/template \
--toc \
--default-image-extension=svg \
--css=http://thisisdallas.github.io/Simple-Grid/simpleGrid.css \
-o html/$x.html
done
rm tmp.*