tweak-html now generates HTML in according with the style of ../tools/htdocs/index...
[mkws-moved-to-github.git] / doc / tweak-html
1 #!/bin/sh
2
3 # Tweak the HTML generated by pandoc into the form we want
4
5 cat ${@+"$@"} |
6     sed '/^<col width="[0-9]*%" \/>$/d' |
7     sed 's/<body>/&\
8 <img src="images\/mkws-logo-300px.png" alt="MKWS logo"\/>/' | awk '
9 /^<h[0-9] id/ {
10   if (seen) {
11     print "</div>";
12   }     
13   print "<div class='"'"pane"'"'>";
14   seen = 1;
15 }
16 /^<hr/ {
17   print "</div>";
18 }
19 { print }
20 '