1
0
Fork 0
mirror of https://github.com/Findus23/IM-Arbeitsauftrag.git synced 2024-08-27 19:52:14 +02:00
IM-Arbeitsauftrag/script.sh
2014-12-23 19:03:11 +01:00

42 lines
1.1 KiB
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
if [ ! -d done ]
then
mkdir ./done
echo "Neuen Ordner erstellt"
else
rm ./done/*
echo "alte Dateien gelöscht"
fi
format=$(zenity --entry --text "Welches Dateiformat soll ausgegeben werden?" --title "Dateiformat") || exit 1
if [ -z $format ]
then
format="png"
fi
name=$(zenity --entry --text "Welchen Namen sollen die Dateien haben?" --title "Dateiname") || exit 1
if [ -z $name ]
then
name="2008­-Sanierung­-"
fi
convert -monitor -resize 100x Logo-ohne-BRG-klein.png ./done/logo.png
a=1
for i in *.JPG
do
a_f="$(printf "%02d" $a)"
echo "./neu/Bild_$a.jpg"
convert -monitor -caption '%f' -resize 640x $i \
-gravity SouthEast ./done/logo.png -geometry +15+15 \
-composite \
-bordercolor snow -background black \
-gravity center -font 'Liberation Sans' -pointsize 26 \
+polaroid \
./done/$name­$a_f.$format
((a++))
done
montage -monitor -label '%f\n%wx%h' -geometry '300x+5+5' ./done/*.$format -caption '%f\n%wx%h' -font 'Liberation Sans' -pointsize 20 -background transparent -frame 5 ./done/Thumbnails.$format
rm ./done/logo.png
zenity --info --text "Das Programm ist fertig." --title "Fertig"