added suppprt for telegram upload

This commit is contained in:
Shihaam Abdul Rahman 2022-09-09 13:47:53 +05:00
parent 1dd2c01a1d
commit 7995b3ee39
3 changed files with 10 additions and 2 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
prayer_added.png
.env

7
env.sample Normal file
View 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'

View File

@ -48,7 +48,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=$INPUT
convert $INPUT \
-font $PWD/CourierPrime.ttf \
@ -72,4 +72,4 @@ imagemagick $(human $Asr) asr
imagemagick $(human $Maghrib) magrib
imagemagick $(human $Isha) isha
feh $OUTPUT
curl -s -F photo=@$OUTPUT $TG_BOTAPI$TG_BOT_TOKEN/sendphoto?chat_id=$TG_CHATID