summaryrefslogtreecommitdiff
path: root/report/mkmd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'report/mkmd.sh')
-rwxr-xr-xreport/mkmd.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/report/mkmd.sh b/report/mkmd.sh
new file mode 100755
index 0000000..39ec83d
--- /dev/null
+++ b/report/mkmd.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+#stem="Greens-IslandsofResiliences"
+stem="Greens-IslandsofResilience"
+
+pdftohtml -q -c -s -i -noframes -stdout "$stem.pdf" tmp
+
+infile=tmp.html
+
+outfile="${2:-$(basename "$infile" .html).md}"
+
+#perl ./normalize-html.pl tmp.html | less
+perl ./normalize-html.pl tmp.html \
+ |pandoc --normalize --no-wrap --parse-raw -f html -t markdown -o "$stem.md"
+
+pandoc --standalone --toc -f markdown -t html5 -i "$stem.md" -o "$stem.html"