time
This commit is contained in:
commit
8fd076b9e0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
prayer_added.png
|
||||
.env
|
||||
|
7
env.sample
Normal file
7
env.sample
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
# Telegram Config
|
||||
TG_BOT_TOKEN='' #Your Telegram Bot API Token, Contact @BotFather on Telegram to obtain token
|
||||
TG_CHATID='' #Your Telegram chat ID, This could be your user, group, supergroup or channel ID, add "-100" first if supergroup or channel
|
||||
|
||||
# DO NOT EDIT THESE UNLESS YOU KNOW WHAT YOURE DOING
|
||||
TG_BOTAPI='https://api.telegram.org/bot'
|
@ -3,6 +3,7 @@ INPUT=PrayerFinal.png
|
||||
OUTPUT=prayer_added.png
|
||||
PRAYERTIMES_CSV="male.csv"
|
||||
DAY_OF_YEAR=$(($(date -d "@$(date +%s)" +%j) - 1))
|
||||
source .env
|
||||
|
||||
rm $OUTPUT > /dev/null
|
||||
|
||||
@ -51,8 +52,6 @@ then
|
||||
INPUT=$OUTPUT
|
||||
fi
|
||||
|
||||
echo Prayer=$PRAYER DayOfYear=$DAY_OF_YEAR Time=$TIME File=$OUTPUT
|
||||
|
||||
convert $INPUT \
|
||||
-font $PWD/CourierPrime.ttf \
|
||||
-pointsize 48 \
|
||||
@ -76,4 +75,5 @@ imagemagick $(human $Asr) asr
|
||||
imagemagick $(human $Maghrib) magrib
|
||||
imagemagick $(human $Isha) isha
|
||||
imagemagick "" date
|
||||
feh $OUTPUT
|
||||
|
||||
curl -s -F photo=@$OUTPUT $TG_BOTAPI$TG_BOT_TOKEN/sendphoto?chat_id=$TG_CHATID
|
||||
|
Loading…
x
Reference in New Issue
Block a user