49 lines
560 B
Bash
Executable File
49 lines
560 B
Bash
Executable File
#!/bin/bash
|
|
|
|
INPUT=prayer.png
|
|
OUTPUT=prayer_added.png
|
|
|
|
DATE=$1
|
|
|
|
imagemagick(){
|
|
TIME=$1
|
|
PRAYER=$2
|
|
|
|
case $PRAYER in
|
|
fathis)
|
|
POSITION='+667+430'
|
|
;;
|
|
iruaraa)
|
|
POSITION='+429+430'
|
|
;;
|
|
mendhuru)
|
|
POSITION='+193+430'
|
|
;;
|
|
asr)
|
|
POSITION='+667+768'
|
|
;;
|
|
magrib)
|
|
POSITION='+429+768'
|
|
;;
|
|
isha)
|
|
POSITION='+193+768'
|
|
esac
|
|
|
|
if [ -f $OUTPUT ]
|
|
then
|
|
INPUT=$OUTPUT
|
|
fi
|
|
|
|
convert $INPUT \
|
|
-annotate $POSITION $TIME \
|
|
$OUTPUT
|
|
}
|
|
rm $OUTPUT
|
|
|
|
imagemagick $DATE fathis
|
|
imagemagick $DATE iruaraa
|
|
imagemagick $DATE mendhuru
|
|
imagemagick $DATE asr
|
|
imagemagick $DATE magrib
|
|
imagemagick $DATE isha
|