fix empty image

This commit is contained in:
Shihaam Abdul Rahman 2023-02-08 11:05:27 +05:00
parent 1ebbfc0832
commit a62ff51561
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
2 changed files with 10 additions and 1 deletions

7
.nv 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

@ -3,7 +3,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
INPUT=prayer.png
OUTPUT=prayer_added.png
PRAYERTIMES_CSV="male.csv"
DAY_OF_YEAR=$(($(date -d "@$(date +%s)" +%j) - 1))
#DAY_OF_YEAR=$(($(date -d "@$(date +%s)" +%j) - 1)) # no clue why this wasnt whats below from the begning
#DAY_OF_YEAR=$(date +%j) # this adds a zero at the begining and causes issues
DAY_OF_YEAR=$((10#$(date +%j))) # remove the zero https://stackoverflow.com/a/11130324
source .env
rm $OUTPUT > /dev/null