diff --git a/CourierPrime.ttf b/CourierPrime.ttf new file mode 100644 index 0000000..db4e6c1 Binary files /dev/null and b/CourierPrime.ttf differ diff --git a/namaadhuvaguthu.sh b/namaadhuvaguthu.sh index 343551b..049f2aa 100755 --- a/namaadhuvaguthu.sh +++ b/namaadhuvaguthu.sh @@ -2,8 +2,9 @@ INPUT=prayer.png OUTPUT=prayer_added.png - DATE=$1 +ISLAND=$2 +rm $OUTPUT > /dev/null imagemagick(){ TIME=$1 @@ -11,22 +12,22 @@ PRAYER=$2 case $PRAYER in fathis) -POSITION='+667+430' +POSITION='+685+430' ;; iruaraa) -POSITION='+429+430' +POSITION='+440+430' ;; mendhuru) -POSITION='+193+430' +POSITION='+220+430' ;; asr) -POSITION='+667+768' +POSITION='+685+768' ;; magrib) -POSITION='+429+768' +POSITION='+440+768' ;; isha) -POSITION='+193+768' +POSITION='+220+768' esac if [ -f $OUTPUT ] @@ -34,11 +35,14 @@ then INPUT=$OUTPUT fi +echo Island=$ISLAND Prayer=$PRAYER Date=$DATE File=$OUTPUT convert $INPUT \ + -font $PWD/CourierPrime.ttf \ + -pointsize 48 \ + -fill white \ -annotate $POSITION $TIME \ $OUTPUT } -rm $OUTPUT imagemagick $DATE fathis imagemagick $DATE iruaraa @@ -46,3 +50,5 @@ imagemagick $DATE mendhuru imagemagick $DATE asr imagemagick $DATE magrib imagemagick $DATE isha + +feh $OUTPUT