summaryrefslogtreecommitdiff
path: root/macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border
diff options
context:
space:
mode:
Diffstat (limited to 'macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border')
-rw-r--r--macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border41
1 files changed, 41 insertions, 0 deletions
diff --git a/macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border b/macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border
new file mode 100644
index 0000000000..93e50dc377
--- /dev/null
+++ b/macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/border
@@ -0,0 +1,41 @@
+
+#!/bin/bash
+# border
+
+# puts a border around ALL the png and jpg photos in the directory
+# saves the originals to a directory ORIGINALS/ and in the current directory
+# and adds "border_" to the new file
+
+# change the following values as desired
+# colour: #EEAA00 (brownish)
+# border: 10 pixels wide
+
+
+# first eliminate the old ORIGINALS/ because if repeat
+# one obtains nested ORIGINALS/!
+
+rm -fR ORIGINALS/
+
+# eliminate the extensions with capital letters
+# no loop for rename
+ rename .PNG .png *.PNG
+ rename .JPG .jpg *.JPG
+
+# new originals
+mkdir ORIGINALS/
+cp * ORIGINALS/
+
+
+# png
+for img in `ls *.png`
+do
+ convert -mattecolor "#EEAA00" -frame 10x10 $img border_$img
+done
+
+
+# jpg
+for img in `ls *.jpg`
+do
+ convert -mattecolor "#EEAA00" -frame 10x10 $img border_$img
+done
+