output weather to file, added spaces

This commit is contained in:
Shihaam Abdul Rahman 2023-11-11 23:24:02 +05:00
parent 1e627b0bad
commit 31e961529a
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

2
bot.sh
View File

@ -23,7 +23,7 @@ upload_speed=$(grep -oP 'Upload: \K.*(?= Mbit/s)' $speedtest_result)
################################################################################# #################################################################################
# Make the API request # Make the API request
response=$(curl -s "https://api.open-meteo.com/v1/forecast?latitude=${LATITUDE}&longitude=${LONGITUDE}&current_weather=true" > $weather_file) curl -s "https://api.open-meteo.com/v1/forecast?latitude=${LATITUDE}&longitude=${LONGITUDE}&current_weather=true" > $weather_file
# Extract Weather Condition # Extract Weather Condition
weather_condition=$(cat $weather_file | jq '.current_weather.weathercode') weather_condition=$(cat $weather_file | jq '.current_weather.weathercode')
case $weather_condition in case $weather_condition in