updated msp converters
authorChris Koeritz <fred@gruntose.com>
Thu, 9 Feb 2017 12:35:03 +0000 (07:35 -0500)
committerChris Koeritz <fred@gruntose.com>
Thu, 9 Feb 2017 12:35:03 +0000 (07:35 -0500)
scripts/pictures/batch_convert_msp2png.sh [new file with mode: 0644]

diff --git a/scripts/pictures/batch_convert_msp2png.sh b/scripts/pictures/batch_convert_msp2png.sh
new file mode 100644 (file)
index 0000000..84d7c53
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# converts ancient microsoft paint files to PNG format using recoil.
+# arose from a question on askubuntu: http://askubuntu.com/questions/881412/how-can-i-convert-really-old-files-in-microsoft-paint-format-msp-to-a-usabl
+# requires recoil to be installed: http://recoil.sourceforge.net/
+
+# run two phases since sometimes the ending is capitalized.
+for suffix in .msp .MSP; do
+  if [ ! -z "$(ls *${suffix} 2>/dev/null)" ]; then
+    for i in *${suffix} ; do recoil2png -o $(basename $i ${suffix}).png $i ; done
+  fi
+done
+