]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Add script to compare images.
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 30 Jul 2014 21:03:50 +0000 (23:03 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Wed, 30 Jul 2014 21:03:50 +0000 (23:03 +0200)
images/compare-images [new file with mode: 0755]

diff --git a/images/compare-images b/images/compare-images
new file mode 100755 (executable)
index 0000000..1ac67a1
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+(
+for png in *.png; do
+  svg="$(basename $png .png).svg"
+  nbsvg="nb/$(basename $png .png).svg"
+  echo "<p>$png</p>"
+  echo "<table>"
+  echo "<tr>"
+  echo "<td><img width=\"60%\" src=\"$png\"></td>"
+  if [ -e $svg ] ; then
+    echo "<td><img width=\"60%\" src=\"$svg\"></td>"
+  else
+    echo "<td></td>"
+  fi
+  if [ -e $nbsvg ] ; then
+    echo "<td><img width=\"60%\" src=\"$nbsvg\"></td>"
+  else
+    echo "<td></td>"
+  fi
+  echo "</tr>"
+  echo "</table>"
+done
+) > compare.html