diff --git a/.gitignore b/.gitignore index 3a78b6e..fe420b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ prayer_added.png +.env diff --git a/env.sample b/env.sample new file mode 100644 index 0000000..ffe89e9 --- /dev/null +++ b/env.sample @@ -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' diff --git a/namaadhuvaguthu.sh b/namaadhuvaguthu.sh index dc7aa66..4c34aaa 100755 --- a/namaadhuvaguthu.sh +++ b/namaadhuvaguthu.sh @@ -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