time
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user