tweak-html now generates HTML in according with the style of ../tools/htdocs/index...
authorMike Taylor <mike@indexdata.com>
Mon, 13 Oct 2014 13:50:29 +0000 (14:50 +0100)
committerMike Taylor <mike@indexdata.com>
Mon, 13 Oct 2014 13:50:29 +0000 (14:50 +0100)
* Remove extraneous trailing slash from sed rule.
* Insert big MKWS logo at top right.
* Add awk script to wrap headed sections in <div class='pane'>

doc/tweak-html

index 44d208b..d237ed1 100755 (executable)
@@ -3,4 +3,18 @@
 # Tweak the HTML generated by pandoc into the form we want
 
 cat ${@+"$@"} |
-    sed '/^<col width="[0-9]*%" \/>$//d'
+    sed '/^<col width="[0-9]*%" \/>$/d' |
+    sed 's/<body>/&\
+<img src="images\/mkws-logo-300px.png" alt="MKWS logo"\/>/' | awk '
+/^<h[0-9] id/ {
+  if (seen) {
+    print "</div>";
+  }     
+  print "<div class='"'"pane"'"'>";
+  seen = 1;
+}
+/^<hr/ {
+  print "</div>";
+}
+{ print }
+'