From 868e7b05b22b0a1b78fabb10bb44e3b190195089 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Tue, 13 Sep 2022 18:58:40 +0500 Subject: [PATCH] time --- namaadhuvaguthu.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/namaadhuvaguthu.sh b/namaadhuvaguthu.sh index dc7aa66..f1cc278 100755 --- a/namaadhuvaguthu.sh +++ b/namaadhuvaguthu.sh @@ -1,6 +1,5 @@ #!/bin/bash - -INPUT=prayer.png +INPUT=PrayerFinal.png OUTPUT=prayer_added.png PRAYERTIMES_CSV="male.csv" DAY_OF_YEAR=$(($(date -d "@$(date +%s)" +%j) - 1)) @@ -41,6 +40,10 @@ POSITION='+440+768' ;; isha) POSITION='+220+768' +;; +date) +POSITION='+430+130' +TIME=$(date +'%d-%M-%Y') esac if [ -f $OUTPUT ] @@ -48,7 +51,7 @@ then INPUT=$OUTPUT fi -echo Prayer=$PRAYER DayOfYear=$DAY_OF_YEAR Time=$TIME File=$OUTPUT +echo Prayer=$PRAYER DayOfYear=$DAY_OF_YEAR Time=$TIME File=$OUTPUT convert $INPUT \ -font $PWD/CourierPrime.ttf \ @@ -65,11 +68,12 @@ Asr=$(grep "^$DAY_OF_YEAR," $PRAYERTIMES_CSV | cut -d, -f5) Maghrib=$(grep "^$DAY_OF_YEAR," $PRAYERTIMES_CSV | cut -d, -f6) Isha=$(grep "^$DAY_OF_YEAR," $PRAYERTIMES_CSV | cut -d, -f7) + imagemagick $(human $Fajr) fathis imagemagick $(human $Sunrise) iruaraa imagemagick $(human $Dhuhr) mendhuru imagemagick $(human $Asr) asr imagemagick $(human $Maghrib) magrib imagemagick $(human $Isha) isha - +imagemagick "" date feh $OUTPUT