You are not logged in.
Hello
The script is mine, made with my meager knowledge, I suppose it can be simplified.
I haven't yet figured out how to simplify the 3 requests into one, since the number of requests is limited by 24 hours.
I've just looked at the accuweather site and from what I understand, I'm entitled to 50 requests per 24 hours for each api.
As my script makes 3 requests @ a time, I'm more than limited in the number of calls.
I need something like that:
wget -O $HOME/Accuweather/json/days.json “https://dataservice.accuweather.com/currentconditions/forecasts/v1/daily/5day/hourly/12hour/135050?apikey=xxxxxxxxxxxxxxxxxxxxxx&language=fr-fr&details=true&metric=true”
I haven't found the right request order yet, and I don't know if the api allows me to ask for it.
the script :
#!/usr/bin/bash
wget -O $HOME/Accuweather/json/jours.json "https://dataservice.accuweather.com/forecasts/v1/daily/5day/135050?apikey=xxxxxxxxxxxxxxxxxxxxxxxxx&language=fr-fr&details=true&metric=true"
jq --raw-output . $HOME/Accuweather/json/jours.json > $HOME/Accuweather/raws/jours
wget -O $HOME/Accuweather/json/current.json "https://dataservice.accuweather.com/currentconditions/v1/135050?apikey=xxxxxxxxxxxxxxxxxxxxxxxxx&language=fr-fr&details=true&metric=true"
jq --raw-output . $HOME/Accuweather/json/current.json > $HOME/Accuweather/raws/current
wget -O $HOME/Accuweather/json/heures.json "https://dataservice.accuweather.com/forecasts/v1/hourly/12hour/135050?apikey=xxxxxxxxxxxxxxxxxxxxxxxx&language=fr-fr&details=true&metric=true"
jq --raw-output . $HOME/Accuweather/json/heures.json > $HOME/Accuweather/raws/heures
#icone direction vent
wind_direction=$(sed -n 1p $HOME/Accuweather/raws/direction)
if [[ $wind_direction == "S" ]]; then
cp $HOME/Accuweather/vents/"02.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "South" ]]; then
cp $HOME/Accuweather/vents/"02.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "SSO" ]]; then
cp $HOME/Accuweather/vents/"03.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "SO" ]]; then
cp $HOME/Accuweather/vents/"04.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "OSO" ]]; then
cp $HOME/Accuweather/vents/"05.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "O" ]]; then
cp $HOME/Accuweather/vents/"06.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "West" ]]; then
cp $HOME/Accuweather/vents/"06.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "ONO" ]]; then
cp $HOME/Accuweather/vents/"07.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "NO" ]]; then
cp $HOME/Accuweather/vents/"08.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "NNO" ]]; then
cp $HOME/Accuweather/vents/"09.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "N" ]]; then
cp $HOME/Accuweather/vents/"10.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "North" ]]; then
cp $HOME/Accuweather/vents/"10.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
cp $HOME/Accuweather/vents/"11.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
cp $HOME/Accuweather/vents/"12.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
cp $HOME/Accuweather/vents/"13.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "E" ]]; then
cp $HOME/Accuweather/vents/"14.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "East" ]]; then
cp $HOME/Accuweather/vents/"14.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
cp $HOME/Accuweather/vents/"15.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
cp $HOME/Accuweather/vents/"16.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
cp $HOME/Accuweather/vents/"17.png" $HOME/Accuweather/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
cp $HOME/Accuweather/vents/"00.png" $HOME/Accuweather/Wind1.png
fi
sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' $HOME/Accuweather/raws/direction
#### maintenant condition icône ######
icon=$(jq --raw-output '.[0].WeatherText' $HOME/Accuweather/raws/current)
if [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/now.png
elif [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/now.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/now.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/now.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/now.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/now.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/now.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/now.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/now.png
fi
#### aujourdh'ui icône ######
icon=$(jq --raw-output '.DailyForecasts[0]."Day".Icon' $HOME/Accuweather/raws/jours)
if [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/d0.png
elif [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/d0.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/d0.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/d0.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d0.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/d0.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/d0.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/d0.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/d0.png
fi
sed -i -e 's/New Moon/Nouvelle Lune/g' -e 's/Waxing Crescent/Lune Montante/g' -e 's/First Quarter/Premier Quartier/g' -e 's/Waxing Gibbous/Gibeuse Croissante/g' -e 's/Full Moon/Pleine Lune/g' -e 's/Waning Gibbous/Gibeuse Décroissante/g' -e 's/Last Quarter/Dernier Quartier/g' -e 's/Waning Crescent/Lune Déscendante/g' /$HOME/Accuweather/raws/jours
#### j+1 icône ######
icon=$(jq --raw-output '.DailyForecasts[1]."Day".Icon' $HOME/Accuweather/raws/jours)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/d1.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/d1.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/d1.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/d1.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d1.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/d1.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/d1.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/d1.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/d1.png
fi
#### j+2 icône ######
icon=$(jq --raw-output '.DailyForecasts[2]."Day".Icon' $HOME/Accuweather/raws/jours)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/d2.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/d2.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/d2.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/d2.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d2.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/d2.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/d2.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/d2.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/d2.png
fi
#### j+3 icône ######
icon=$(jq --raw-output '.DailyForecasts[3]."Day".Icon' $HOME/Accuweather/raws/jours)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/d3.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/d3.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/d3.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/d3.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d3.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/d3.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/d3.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/d3.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/d3.png
fi
#### j+4 icône ######
icon=$(jq --raw-output '.DailyForecasts[4]."Day".Icon' $HOME/Accuweather/raws/jours)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/d4.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d4.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/d4.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/d4.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/d4.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/d4.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/d4.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/d4.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/d4.png
fi
#### h0 icône ######
icon=$(jq --raw-output '.[0].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h0.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h0.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h0.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h0.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h0.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h0.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h0.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h0.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h0.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h0.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h0.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h0.png
fi
#### h1 icône ######
icon=$(jq --raw-output '.[1].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h1.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h1.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h1.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h1.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h1.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h1.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h1.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h1.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h1.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h1.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h1.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h1.png
fi
#### h2 icône ######
icon=$(jq --raw-output '.[2].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h2.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h2.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h2.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h2.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h2.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h2.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h2.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h2.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h2.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h2.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h2.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h2.png
fi
#### h3 icône ######
icon=$(jq --raw-output '.[3].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h3.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h3.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h3.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h3.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h3.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h3.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h3.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h3.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h3.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h3.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h3.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h3.png
fi
#### h4 icône ######
icon=$(jq --raw-output '.[4].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h4.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h4.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h4.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h4.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h4.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h4.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h4.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h4.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h4.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h4.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h4.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h4.png
fi
#### h5 icône ######
icon=$(jq --raw-output '.[5].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h5.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h5.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h5.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h5.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h5.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h5.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h5.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h5.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h5.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h5.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h5.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h5.png
fi
#### h6 icône ######
icon=$(jq --raw-output '.[6].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h6.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h6.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h6.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h6.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h6.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h6.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h6.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h6.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h6.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h6.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h6.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h6.png
fi
#### h7 icône ######
icon=$(jq --raw-output '.[7].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h7.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h7.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h7.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h7.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h7.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h7.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h7.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h7.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h7.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h7.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h7.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h7.png
fi
#### h8 icône ######
icon=$(jq --raw-output '.[8].WeatherIcon' $HOME/Accuweather/raws/heures)
if [[ $icon == "7" ]]; then
cp $HOME/Accuweather/icones/"7.png" $HOME/Accuweather/h8.png
elif [[ $icon == "2" ]]; then
cp $HOME/Accuweather/icones/"2.png" $HOME/Accuweather/h8.png
elif [[ $icon == "4" ]]; then
cp $HOME/Accuweather/icones/"4.png" $HOME/Accuweather/h8.png
elif [[ $icon == "6" ]]; then
cp $HOME/Accuweather/icones/"6.png" $HOME/Accuweather/h8.png
elif [[ $icon == "12" ]]; then
cp $HOME/Accuweather/icones/"12.png" $HOME/Accuweather/h8.png
elif [[ $icon == "13" ]]; then
cp $HOME/Accuweather/icones/"13.png" $HOME/Accuweather/h8.png
elif [[ $icon == "33" ]]; then
cp $HOME/Accuweather/icones/"33.png" $HOME/Accuweather/h8.png
elif [[ $icon == "34" ]]; then
cp $HOME/Accuweather/icones/"34.png" $HOME/Accuweather/h8.png
elif [[ $icon == "35" ]]; then
cp $HOME/Accuweather/icones/"35.png" $HOME/Accuweather/h8.png
elif [[ $icon == "36" ]]; then
cp $HOME/Accuweather/icones/"36.png" $HOME/Accuweather/h8.png
elif [[ $icon == "38" ]]; then
cp $HOME/Accuweather/icones/"38.png" $HOME/Accuweather/h8.png
elif [[ $icon == "40" ]]; then
cp $HOME/Accuweather/icones/"40.png" $HOME/Accuweather/h8.png
fi
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Maybe this will help you:
https://developer.accuweather.com/accuw … t-api/apis
and:
https://developer.accuweather.com/accuw … s-api/apis
EDIT
I think this is important:
Sign up for an AccuWeather APIs account and get free access to a sampling of our weather API endpoints, including Locations, Current Conditions, and Daily and Hourly Forecasts.
Limited Trial access allows each developer up to 50 calls per day.
https://developer.accuweather.com
They are different APIs and you should have 50 calls per day for each, but I'm not sure.
Last edited by marens (2024-05-25 14:48:50)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Thank you, it's on these sites that I chose my api.
like you I'm not sure, 50 calls in 24h for each api or 50 calls for my free key, that's the question.
today since this morning it work great ,script is calling every hours
@+
Last edited by loutch (2024-05-25 16:05:26)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
today since this morning it work great ,script is calling every hours
That's the only thing that matters.
like you I'm not sure, 50 calls in 24h for each api or 50 calls for my free key, that's the question.
We don't know what will happen if there are 51 or more calls per day.
There is nothing here about that.
Note *
We are usually penalized with a 24 hour suspension or no further access that day.
Try running the script every half hour or 40 minutes tomorrow.
That should be enough.
P.S.
The icons are here:
https://developer.accuweather.com/weather-icons
We already have them in the accuweather conky script (Forecast_images_2015).
If people would know how little brain is ruling the world, they would die of fear.
Offline
This could be interesting, especially for those who modify weather scripts.
I need to know when conky was updated and how old the displayed data is.
Teo usually runs the script every 500s and updates the data in conky every 600s.
This is what the first line looks like in my accuweather_RSS conky:
${offset 2}${color 48BCFF}WEATHER\
${font :size=9:italic}${alignr}\
${scroll 9 9\
${color 48BCFF}${texeci 600 date +%T} \
${color EEA220}${texeci 600 date -r $HOME/Accuweather_RSS_conky_script/weather_raw -R | awk '{print $5}'}}${color}${font}\
${execi 500 bash $HOME/Accuweather_RSS_conky_script/acc_RSS}
Using the scroll command, I created a blinking effect.
The light blue color shows when conky is updated, and a few seconds later the light orange color shows how old the displayed data is.
Give it a try and if you like it, you can use a similar approach with other weather scripts.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
We don't know what will happen if there are 51 or more calls per day.
There is nothing here about that.
For testing purposes, I modofied the script to run every 15 minutes.
When I exceeded my quota of calls, the .json files were empty, so there was nothing in the conky. I put my calls back on every hour and when I launched this morning, my .json files were full again.
Now I don't know how my 50 API requests were counted.
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ Yes, that was expected.
It takes time to investigate in more detail.
Do you know how long conky worked?
In that case it is easy to calculate.
Try running the script every 30 minutes tomorrow, but remember the time you started.
In the meantime, you can customize the conky to look the way you want.
Just remove (temporarily) the line that runs the script from conky.
That way you can try many options without updating the script.
Good luck!
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
marens wrote:We don't know what will happen if there are 51 or more calls per day.
There is nothing here about that.For testing purposes, I modofied the script to run every 15 minutes.
When I exceeded my quota of calls, the .json files were empty, so there was nothing in the conky. I put my calls back on every hour and when I launched this morning, my .json files were full again.
Now I don't know how my 50 API requests were counted.@+
@loutch,
je ne peux que parler de mon expérience à l'époque avec wunderground.
Avec le script de @mrpeachy, l'intensité des requêtes était limitée à 500 call's par jour. Tout ce qui était demandé en plus n'était pas répondu ou l'utilisateur recevait un e-mail lui indiquant que s'il ne limitait pas les requêtes à la 'version gratuite de l'API', cela devenait payant.
Le script était réglé sur 1800 secondes. Selon AdamRies
86400 : 1800 = 48
Donc, si tu as 50 disponibles, tu devrais régler 1800.
De plus, je te conseille de regarder dans ton compte Accuweather. J'ai pu voir l'intensité de l'interrogation sur wunderground.
--------------------------------------
@loutch,
I can only report on my experience with wunderground back then.
With @mrpeachy's script, the query intensity was limited to 500 calls per day. Anything in excess of this was not answered or the user received an email stating that there would be a charge if he did not limit the queries to the 'free API version'.
The script was set to 1800Sec. According to AdamRies
86400 : 1800 = 48
So, if you have 50 available, you should set 1800.
I also recommend that you check your Accuweather account. I was able to see the query intensity at wunderground.
Offline
This could be interesting, especially for those who modify weather scripts.
I need to know when conky was updated and how old the displayed data is.
Teo usually runs the script every 500s and updates the data in conky every 600s.This is what the first line looks like in my accuweather_RSS conky:
${offset 2}${color 48BCFF}WEATHER\ ${font :size=9:italic}${alignr}\ ${scroll 9 9\ ${color 48BCFF}${texeci 600 date +%T} \ ${color EEA220}${texeci 600 date -r $HOME/Accuweather_RSS_conky_script/weather_raw -R | awk '{print $5}'}}${color}${font}\ ${execi 500 bash $HOME/Accuweather_RSS_conky_script/acc_RSS}
Using the scroll command, I created a blinking effect.
The light blue color shows when conky is updated, and a few seconds later the light orange color shows how old the displayed data is.Give it a try and if you like it, you can use a similar approach with other weather scripts.
Thank you!
That works.
Offline
^ If you set update_interval (example 5.0) in configuration, you can define blink duration in seconds.
If I remember correctly, you use the command date +%T in accuweather conky.
Now you can improve it a bit.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Accuweather api with free key
current raws
[
{
"LocalObservationDateTime": "2024-05-29T16:01:00+02:00",
"EpochTime": 1716991260,
"WeatherText": "Nuageux",
"WeatherIcon": 7,
"HasPrecipitation": false,
"PrecipitationType": null,
"IsDayTime": true,
"Temperature": {
"Metric": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 57,
"Unit": "F",
"UnitType": 18
}
},
"RealFeelTemperature": {
"Metric": {
"Value": 10.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Imperial": {
"Value": 50,
"Unit": "F",
"UnitType": 18,
"Phrase": "Assez frais"
}
},
"RealFeelTemperatureShade": {
"Metric": {
"Value": 10.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Imperial": {
"Value": 50,
"Unit": "F",
"UnitType": 18,
"Phrase": "Assez frais"
}
},
"RelativeHumidity": 87,
"IndoorRelativeHumidity": 61,
"DewPoint": {
"Metric": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 54,
"Unit": "F",
"UnitType": 18
}
},
"Wind": {
"Direction": {
"Degrees": 225,
"Localized": "SO",
"English": "SW"
},
"Speed": {
"Metric": {
"Value": 20.4,
"Unit": "km/h",
"UnitType": 7
},
"Imperial": {
"Value": 12.7,
"Unit": "mi/h",
"UnitType": 9
}
}
},
"WindGust": {
"Speed": {
"Metric": {
"Value": 20.4,
"Unit": "km/h",
"UnitType": 7
},
"Imperial": {
"Value": 12.7,
"Unit": "mi/h",
"UnitType": 9
}
}
},
"UVIndex": 1,
"UVIndexText": "Minimum",
"Visibility": {
"Metric": {
"Value": 16.1,
"Unit": "km",
"UnitType": 6
},
"Imperial": {
"Value": 10,
"Unit": "mi",
"UnitType": 2
}
},
"ObstructionsToVisibility": "R-",
"CloudCover": 100,
"Ceiling": {
"Metric": {
"Value": 274,
"Unit": "m",
"UnitType": 5
},
"Imperial": {
"Value": 900,
"Unit": "ft",
"UnitType": 0
}
},
"Pressure": {
"Metric": {
"Value": 1013,
"Unit": "mb",
"UnitType": 14
},
"Imperial": {
"Value": 29.91,
"Unit": "inHg",
"UnitType": 12
}
},
"PressureTendency": {
"LocalizedText": "Stationnaire",
"Code": "S"
},
"Past24HourTemperatureDeparture": {
"Metric": {
"Value": -5,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": -9,
"Unit": "F",
"UnitType": 18
}
},
"ApparentTemperature": {
"Metric": {
"Value": 17.2,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 63,
"Unit": "F",
"UnitType": 18
}
},
"WindChillTemperature": {
"Metric": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 57,
"Unit": "F",
"UnitType": 18
}
},
"WetBulbTemperature": {
"Metric": {
"Value": 13,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 55,
"Unit": "F",
"UnitType": 18
}
},
"WetBulbGlobeTemperature": {
"Metric": {
"Value": 13.3,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 56,
"Unit": "F",
"UnitType": 18
}
},
"Precip1hr": {
"Metric": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0,
"Unit": "in",
"UnitType": 1
}
},
"PrecipitationSummary": {
"Precipitation": {
"Metric": {
"Value": 0.5,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.02,
"Unit": "in",
"UnitType": 1
}
},
"PastHour": {
"Metric": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0,
"Unit": "in",
"UnitType": 1
}
},
"Past3Hours": {
"Metric": {
"Value": 3.6,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.14,
"Unit": "in",
"UnitType": 1
}
},
"Past6Hours": {
"Metric": {
"Value": 4.1,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.16,
"Unit": "in",
"UnitType": 1
}
},
"Past9Hours": {
"Metric": {
"Value": 4.1,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.16,
"Unit": "in",
"UnitType": 1
}
},
"Past12Hours": {
"Metric": {
"Value": 4.1,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.16,
"Unit": "in",
"UnitType": 1
}
},
"Past18Hours": {
"Metric": {
"Value": 4.1,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.16,
"Unit": "in",
"UnitType": 1
}
},
"Past24Hours": {
"Metric": {
"Value": 4.1,
"Unit": "mm",
"UnitType": 3
},
"Imperial": {
"Value": 0.16,
"Unit": "in",
"UnitType": 1
}
}
},
"TemperatureSummary": {
"Past6HourRange": {
"Minimum": {
"Metric": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 57,
"Unit": "F",
"UnitType": 18
}
},
"Maximum": {
"Metric": {
"Value": 16.2,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 61,
"Unit": "F",
"UnitType": 18
}
}
},
"Past12HourRange": {
"Minimum": {
"Metric": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 55,
"Unit": "F",
"UnitType": 18
}
},
"Maximum": {
"Metric": {
"Value": 16.2,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 61,
"Unit": "F",
"UnitType": 18
}
}
},
"Past24HourRange": {
"Minimum": {
"Metric": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 55,
"Unit": "F",
"UnitType": 18
}
},
"Maximum": {
"Metric": {
"Value": 18.9,
"Unit": "C",
"UnitType": 17
},
"Imperial": {
"Value": 66,
"Unit": "F",
"UnitType": 18
}
}
}
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/current-weather/135050",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/current-weather/135050"
}
]
5day raws
{
"Headline": {
"EffectiveDate": "2024-05-29T14:00:00+02:00",
"EffectiveEpochDate": 1716984000,
"Severity": 3,
"Text": "Pluies intermittentes attendues de mercredi après-midi jusqu'à mercredi soir",
"Category": "rain",
"EndDate": "2024-05-30T02:00:00+02:00",
"EndEpochDate": 1717027200,
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?unit=c"
},
"DailyForecasts": [
{
"Date": "2024-05-29T07:00:00+02:00",
"EpochDate": 1716958800,
"Sun": {
"Rise": "2024-05-29T05:33:00+02:00",
"EpochRise": 1716953580,
"Set": "2024-05-29T21:25:00+02:00",
"EpochSet": 1717010700
},
"Moon": {
"Rise": "2024-05-29T02:04:00+02:00",
"EpochRise": 1716941040,
"Set": "2024-05-29T11:10:00+02:00",
"EpochSet": 1716973800,
"Phase": "WaningGibbous",
"Age": 21
},
"Temperature": {
"Minimum": {
"Value": 12,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 16.5,
"Unit": "C",
"UnitType": 17
}
},
"RealFeelTemperature": {
"Minimum": {
"Value": 9.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 15,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"RealFeelTemperatureShade": {
"Minimum": {
"Value": 9.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 15,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"HoursOfSun": 1.7,
"DegreeDaySummary": {
"Heating": {
"Value": 4,
"Unit": "C",
"UnitType": 17
},
"Cooling": {
"Value": 0,
"Unit": "C",
"UnitType": 17
}
},
"AirAndPollen": [
{
"Name": "AirQuality",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1,
"Type": "Ozone"
},
{
"Name": "Grass",
"Value": 25,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Mold",
"Value": 32767,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Ragweed",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Tree",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "UVIndex",
"Value": 2,
"Category": "Bon",
"CategoryValue": 1
}
],
"Day": {
"Icon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate",
"ShortPhrase": "Nuageux avec quelques averses",
"LongPhrase": "Nuageux avec quelques averses",
"PrecipitationProbability": 86,
"ThunderstormProbability": 17,
"RainProbability": 86,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 18.5,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 227,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 46.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 240,
"Localized": "OSO",
"English": "WSW"
}
},
"TotalLiquid": {
"Value": 6.2,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 6.2,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 3,
"HoursOfRain": 3,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 94,
"Evapotranspiration": {
"Value": 1.8,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 1596.5,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 74,
"Maximum": 88,
"Average": 80
},
"WetBulbTemperature": {
"Minimum": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 13.5,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 13.3,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 15.3,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 14.3,
"Unit": "C",
"UnitType": 17
}
}
},
"Night": {
"Icon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate",
"ShortPhrase": "Averses le soir; sinon, nuageux",
"LongPhrase": "Averses le soir; sinon, nuageux",
"PrecipitationProbability": 100,
"ThunderstormProbability": 25,
"RainProbability": 100,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 11.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 219,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 27.8,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 215,
"Localized": "SO",
"English": "SW"
}
},
"TotalLiquid": {
"Value": 10.1,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 10.1,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 3,
"HoursOfRain": 3,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 98,
"Evapotranspiration": {
"Value": 0.3,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 117.2,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 79,
"Maximum": 99,
"Average": 91
},
"WetBulbTemperature": {
"Minimum": {
"Value": 12,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13.7,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12.9,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 12.4,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14.6,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 13.2,
"Unit": "C",
"UnitType": 17
}
}
},
"Sources": [
"AccuWeather "
],
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=1&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=1&unit=c"
},
{
"Date": "2024-05-30T07:00:00+02:00",
"EpochDate": 1717045200,
"Sun": {
"Rise": "2024-05-30T05:33:00+02:00",
"EpochRise": 1717039980,
"Set": "2024-05-30T21:27:00+02:00",
"EpochSet": 1717097220
},
"Moon": {
"Rise": "2024-05-30T02:25:00+02:00",
"EpochRise": 1717028700,
"Set": "2024-05-30T12:34:00+02:00",
"EpochSet": 1717065240,
"Phase": "Last",
"Age": 22
},
"Temperature": {
"Minimum": {
"Value": 10,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 17.8,
"Unit": "C",
"UnitType": 17
}
},
"RealFeelTemperature": {
"Minimum": {
"Value": 7.9,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 20.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Agréable"
}
},
"RealFeelTemperatureShade": {
"Minimum": {
"Value": 7.9,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 16.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"HoursOfSun": 4.6,
"DegreeDaySummary": {
"Heating": {
"Value": 4,
"Unit": "C",
"UnitType": 17
},
"Cooling": {
"Value": 0,
"Unit": "C",
"UnitType": 17
}
},
"AirAndPollen": [
{
"Name": "AirQuality",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1,
"Type": "Ozone"
},
{
"Name": "Grass",
"Value": 32,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Mold",
"Value": 32767,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Ragweed",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Tree",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "UVIndex",
"Value": 8,
"Category": "Malsain",
"CategoryValue": 4
}
],
"Day": {
"Icon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light",
"ShortPhrase": "Plutôt nuageux, faible pluie",
"LongPhrase": "Plutôt nuageux, faible pluie",
"PrecipitationProbability": 82,
"ThunderstormProbability": 4,
"RainProbability": 82,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 261,
"Localized": "O",
"English": "W"
}
},
"WindGust": {
"Speed": {
"Value": 35.2,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 266,
"Localized": "O",
"English": "W"
}
},
"TotalLiquid": {
"Value": 3.2,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 3.2,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 2,
"HoursOfRain": 2,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 74,
"Evapotranspiration": {
"Value": 2.3,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 5009.1,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 63,
"Maximum": 95,
"Average": 78
},
"WetBulbTemperature": {
"Minimum": {
"Value": 12.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 13.4,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 13.5,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 16.7,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 15,
"Unit": "C",
"UnitType": 17
}
}
},
"Night": {
"Icon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate",
"ShortPhrase": "Plutôt nuageux, faible pluie",
"LongPhrase": "Plutôt nuageux, faible pluie",
"PrecipitationProbability": 83,
"ThunderstormProbability": 18,
"RainProbability": 83,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 292,
"Localized": "ONO",
"English": "WNW"
}
},
"WindGust": {
"Speed": {
"Value": 27.8,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 275,
"Localized": "O",
"English": "W"
}
},
"TotalLiquid": {
"Value": 7,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 7,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 4.5,
"HoursOfRain": 4.5,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 85,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 334.7,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 81,
"Maximum": 99,
"Average": 91
},
"WetBulbTemperature": {
"Minimum": {
"Value": 10,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 10.9,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 10,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14.2,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12,
"Unit": "C",
"UnitType": 17
}
}
},
"Sources": [
"AccuWeather "
],
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=2&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=2&unit=c"
},
{
"Date": "2024-05-31T07:00:00+02:00",
"EpochDate": 1717131600,
"Sun": {
"Rise": "2024-05-31T05:32:00+02:00",
"EpochRise": 1717126320,
"Set": "2024-05-31T21:28:00+02:00",
"EpochSet": 1717183680
},
"Moon": {
"Rise": "2024-05-31T02:42:00+02:00",
"EpochRise": 1717116120,
"Set": "2024-05-31T13:57:00+02:00",
"EpochSet": 1717156620,
"Phase": "WaningCrescent",
"Age": 23
},
"Temperature": {
"Minimum": {
"Value": 9.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 16.9,
"Unit": "C",
"UnitType": 17
}
},
"RealFeelTemperature": {
"Minimum": {
"Value": 8.8,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 18.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Agréable"
}
},
"RealFeelTemperatureShade": {
"Minimum": {
"Value": 8.8,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 14.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"HoursOfSun": 3.7,
"DegreeDaySummary": {
"Heating": {
"Value": 5,
"Unit": "C",
"UnitType": 17
},
"Cooling": {
"Value": 0,
"Unit": "C",
"UnitType": 17
}
},
"AirAndPollen": [
{
"Name": "AirQuality",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1,
"Type": "Ozone"
},
{
"Name": "Grass",
"Value": 4,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Mold",
"Value": 32767,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Ragweed",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Tree",
"Value": 3,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "UVIndex",
"Value": 8,
"Category": "Malsain",
"CategoryValue": 4
}
],
"Day": {
"Icon": 13,
"IconPhrase": "Plutôt nuageux - averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light",
"ShortPhrase": "Soleil suivi de nuages avec quelques averses",
"LongPhrase": "Ensoleillé, devenant nuageux avec quelques averses",
"PrecipitationProbability": 87,
"ThunderstormProbability": 17,
"RainProbability": 87,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 275,
"Localized": "O",
"English": "W"
}
},
"WindGust": {
"Speed": {
"Value": 35.2,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 269,
"Localized": "O",
"English": "W"
}
},
"TotalLiquid": {
"Value": 4.9,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 4.9,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 3.5,
"HoursOfRain": 3.5,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 77,
"Evapotranspiration": {
"Value": 2,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 4514.5,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 69,
"Maximum": 92,
"Average": 77
},
"WetBulbTemperature": {
"Minimum": {
"Value": 10.9,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12.4,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 15.1,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
}
}
},
"Night": {
"Icon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"ShortPhrase": "Nuageux",
"LongPhrase": "Nuageux",
"PrecipitationProbability": 25,
"ThunderstormProbability": 2,
"RainProbability": 25,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 268,
"Localized": "O",
"English": "W"
}
},
"WindGust": {
"Speed": {
"Value": 29.6,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 281,
"Localized": "O",
"English": "W"
}
},
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 0,
"HoursOfRain": 0,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0.3,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 29.4,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 77,
"Maximum": 99,
"Average": 89
},
"WetBulbTemperature": {
"Minimum": {
"Value": 9.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 12.4,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 10.9,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 9.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 11.2,
"Unit": "C",
"UnitType": 17
}
}
},
"Sources": [
"AccuWeather "
],
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=3&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=3&unit=c"
},
{
"Date": "2024-06-01T07:00:00+02:00",
"EpochDate": 1717218000,
"Sun": {
"Rise": "2024-06-01T05:31:00+02:00",
"EpochRise": 1717212660,
"Set": "2024-06-01T21:29:00+02:00",
"EpochSet": 1717270140
},
"Moon": {
"Rise": "2024-06-01T02:58:00+02:00",
"EpochRise": 1717203480,
"Set": "2024-06-01T15:19:00+02:00",
"EpochSet": 1717247940,
"Phase": "WaningCrescent",
"Age": 24
},
"Temperature": {
"Minimum": {
"Value": 10.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 16.1,
"Unit": "C",
"UnitType": 17
}
},
"RealFeelTemperature": {
"Minimum": {
"Value": 8.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 14.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"RealFeelTemperatureShade": {
"Minimum": {
"Value": 8.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 14.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
}
},
"HoursOfSun": 1,
"DegreeDaySummary": {
"Heating": {
"Value": 5,
"Unit": "C",
"UnitType": 17
},
"Cooling": {
"Value": 0,
"Unit": "C",
"UnitType": 17
}
},
"AirAndPollen": [
{
"Name": "AirQuality",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1,
"Type": "Ozone"
},
{
"Name": "Grass",
"Value": 14,
"Category": "Modéré",
"CategoryValue": 2
},
{
"Name": "Mold",
"Value": 32767,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Ragweed",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Tree",
"Value": 282,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "UVIndex",
"Value": 2,
"Category": "Bon",
"CategoryValue": 1
}
],
"Day": {
"Icon": 18,
"IconPhrase": "Pluie",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light",
"ShortPhrase": "Pluie et bruine le matin, puis quelques averses",
"LongPhrase": "Nuageux et frais; pluie et bruine occasionnelles le matin, puis quelques averses l'après-midi",
"PrecipitationProbability": 84,
"ThunderstormProbability": 17,
"RainProbability": 84,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 11.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 279,
"Localized": "O",
"English": "W"
}
},
"WindGust": {
"Speed": {
"Value": 31.5,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 276,
"Localized": "O",
"English": "W"
}
},
"TotalLiquid": {
"Value": 1.9,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 1.9,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 2.5,
"HoursOfRain": 2.5,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 99,
"Evapotranspiration": {
"Value": 1.5,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 536.7,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 73,
"Maximum": 93,
"Average": 81
},
"WetBulbTemperature": {
"Minimum": {
"Value": 10.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13.6,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12.3,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 10.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14.5,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17
}
}
},
"Night": {
"Icon": 18,
"IconPhrase": "Pluie",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Heavy",
"ShortPhrase": "Pluie parfois forte",
"LongPhrase": "Pluie parfois forte",
"PrecipitationProbability": 98,
"ThunderstormProbability": 13,
"RainProbability": 98,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 315,
"Localized": "NO",
"English": "NW"
}
},
"WindGust": {
"Speed": {
"Value": 27.8,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 312,
"Localized": "NO",
"English": "NW"
}
},
"TotalLiquid": {
"Value": 28.5,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 28.5,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 8.5,
"HoursOfRain": 8.5,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 29.7,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 84,
"Maximum": 99,
"Average": 91
},
"WetBulbTemperature": {
"Minimum": {
"Value": 10.7,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 11.8,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 10.8,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13.5,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12,
"Unit": "C",
"UnitType": 17
}
}
},
"Sources": [
"AccuWeather "
],
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=4&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=4&unit=c"
},
{
"Date": "2024-06-02T07:00:00+02:00",
"EpochDate": 1717304400,
"Sun": {
"Rise": "2024-06-02T05:31:00+02:00",
"EpochRise": 1717299060,
"Set": "2024-06-02T21:29:00+02:00",
"EpochSet": 1717356540
},
"Moon": {
"Rise": "2024-06-02T03:13:00+02:00",
"EpochRise": 1717290780,
"Set": "2024-06-02T16:42:00+02:00",
"EpochSet": 1717339320,
"Phase": "WaningCrescent",
"Age": 25
},
"Temperature": {
"Minimum": {
"Value": 8.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 17.4,
"Unit": "C",
"UnitType": 17
}
},
"RealFeelTemperature": {
"Minimum": {
"Value": 7.9,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 17.8,
"Unit": "C",
"UnitType": 17,
"Phrase": "Agréable"
}
},
"RealFeelTemperatureShade": {
"Minimum": {
"Value": 7.9,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"Maximum": {
"Value": 16.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Agréable"
}
},
"HoursOfSun": 3.4,
"DegreeDaySummary": {
"Heating": {
"Value": 5,
"Unit": "C",
"UnitType": 17
},
"Cooling": {
"Value": 0,
"Unit": "C",
"UnitType": 17
}
},
"AirAndPollen": [
{
"Name": "AirQuality",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1,
"Type": "Ozone"
},
{
"Name": "Grass",
"Value": 31,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Mold",
"Value": 32767,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "Ragweed",
"Value": 0,
"Category": "Bon",
"CategoryValue": 1
},
{
"Name": "Tree",
"Value": 633,
"Category": "Malsain (p. sensibles)",
"CategoryValue": 3
},
{
"Name": "UVIndex",
"Value": 2,
"Category": "Bon",
"CategoryValue": 1
}
],
"Day": {
"Icon": 8,
"IconPhrase": "Maussade",
"HasPrecipitation": false,
"ShortPhrase": "Nuages bas",
"LongPhrase": "Nuages bas",
"PrecipitationProbability": 25,
"ThunderstormProbability": 1,
"RainProbability": 25,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 11.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 333,
"Localized": "NNO",
"English": "NNW"
}
},
"WindGust": {
"Speed": {
"Value": 29.6,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 330,
"Localized": "NNO",
"English": "NNW"
}
},
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 0,
"HoursOfRain": 0,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 88,
"Evapotranspiration": {
"Value": 1.8,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 1940.6,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 65,
"Maximum": 93,
"Average": 77
},
"WetBulbTemperature": {
"Minimum": {
"Value": 11.2,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 13.8,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 11.3,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 16.2,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 13.7,
"Unit": "C",
"UnitType": 17
}
}
},
"Night": {
"Icon": 38,
"IconPhrase": "Plutôt nuageux",
"HasPrecipitation": false,
"ShortPhrase": "Plutôt nuageux",
"LongPhrase": "Plutôt nuageux",
"PrecipitationProbability": 4,
"ThunderstormProbability": 0,
"RainProbability": 4,
"SnowProbability": 0,
"IceProbability": 0,
"Wind": {
"Speed": {
"Value": 7.4,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 334,
"Localized": "NNO",
"English": "NNW"
}
},
"WindGust": {
"Speed": {
"Value": 24.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 335,
"Localized": "NNO",
"English": "NNW"
}
},
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"HoursOfPrecipitation": 0,
"HoursOfRain": 0,
"HoursOfSnow": 0,
"HoursOfIce": 0,
"CloudCover": 40,
"Evapotranspiration": {
"Value": 0.3,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 164.6,
"Unit": "W/m²",
"UnitType": 33
},
"RelativeHumidity": {
"Minimum": 76,
"Maximum": 96,
"Average": 86
},
"WetBulbTemperature": {
"Minimum": {
"Value": 8.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 10.1,
"Unit": "C",
"UnitType": 17
}
},
"WetBulbGlobeTemperature": {
"Minimum": {
"Value": 8.6,
"Unit": "C",
"UnitType": 17
},
"Maximum": {
"Value": 14.9,
"Unit": "C",
"UnitType": 17
},
"Average": {
"Value": 11.6,
"Unit": "C",
"UnitType": 17
}
}
},
"Sources": [
"AccuWeather "
],
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=5&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/daily-weather-forecast/135050?day=5&unit=c"
}
]
}
12 hours raws
[
{
"DateTime": "2024-05-29T17:00:00+02:00",
"EpochDateTime": 1716994800,
"WeatherIcon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light",
"IsDaylight": true,
"Temperature": {
"Value": 14.7,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.1,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.1,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 13.4,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 14,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 18.5,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 220,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 85,
"IndoorRelativeHumidity": 61,
"Visibility": {
"Value": 9.7,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 1951,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 1,
"UVIndexText": "Minimum",
"PrecipitationProbability": 66,
"ThunderstormProbability": 13,
"RainProbability": 66,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 1.2,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 1.2,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 96,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 110.3,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=17&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=17&unit=c"
},
{
"DateTime": "2024-05-29T18:00:00+02:00",
"EpochDateTime": 1716998400,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 14.6,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 13,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 14,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.6,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 16.7,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 220,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 82,
"IndoorRelativeHumidity": 58,
"Visibility": {
"Value": 9.7,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 1951,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 1,
"UVIndexText": "Minimum",
"PrecipitationProbability": 49,
"ThunderstormProbability": 9,
"RainProbability": 49,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 90,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 160.3,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=18&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=18&unit=c"
},
{
"DateTime": "2024-05-29T19:00:00+02:00",
"EpochDateTime": 1717002000,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 14.4,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 13,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 13.9,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.7,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 14.8,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 221,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 84,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 9.7,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 44,
"ThunderstormProbability": 8,
"RainProbability": 44,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 92,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 86.8,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=19&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=19&unit=c"
},
{
"DateTime": "2024-05-29T20:00:00+02:00",
"EpochDateTime": 1717005600,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 14,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.9,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 13.5,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.7,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 221,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 86,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 8,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 34,
"ThunderstormProbability": 7,
"RainProbability": 34,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 27,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=20&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=20&unit=c"
},
{
"DateTime": "2024-05-29T21:00:00+02:00",
"EpochDateTime": 1717009200,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 13.6,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.7,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.7,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.7,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 13.2,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.8,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 217,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 89,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 9.7,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 34,
"ThunderstormProbability": 7,
"RainProbability": 34,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 97,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=21&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=21&unit=c"
},
{
"DateTime": "2024-05-29T22:00:00+02:00",
"EpochDateTime": 1717012800,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 13.2,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.8,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 215,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 27.8,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 91,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 8,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 40,
"ThunderstormProbability": 9,
"RainProbability": 40,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 98,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=22&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=22&unit=c"
},
{
"DateTime": "2024-05-29T23:00:00+02:00",
"EpochDateTime": 1717016400,
"WeatherIcon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate",
"IsDaylight": false,
"Temperature": {
"Value": 12.9,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 9.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"RealFeelTemperatureShade": {
"Value": 9.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"WetBulbTemperature": {
"Value": 12.3,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.7,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 13,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 213,
"Localized": "SSO",
"English": "SSW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 93,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 8,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 83,
"ThunderstormProbability": 19,
"RainProbability": 83,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 2.2,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 2.2,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=23&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=1&hbhhour=23&unit=c"
},
{
"DateTime": "2024-05-30T00:00:00+02:00",
"EpochDateTime": 1717020000,
"WeatherIcon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Heavy",
"IsDaylight": false,
"Temperature": {
"Value": 12.8,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 8.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"RealFeelTemperatureShade": {
"Value": 8.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"WetBulbTemperature": {
"Value": 12.3,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 11.8,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 11.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 213,
"Localized": "SSO",
"English": "SSW"
}
},
"WindGust": {
"Speed": {
"Value": 25.9,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 94,
"IndoorRelativeHumidity": 59,
"Visibility": {
"Value": 4.8,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 90,
"ThunderstormProbability": 20,
"RainProbability": 90,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 5.8,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 5.8,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=0&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=0&unit=c"
},
{
"DateTime": "2024-05-30T01:00:00+02:00",
"EpochDateTime": 1717023600,
"WeatherIcon": 12,
"IconPhrase": "Averses",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate",
"IsDaylight": false,
"Temperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 9.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"RealFeelTemperatureShade": {
"Value": 9.6,
"Unit": "C",
"UnitType": 17,
"Phrase": "Assez frais"
},
"WetBulbTemperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 12,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 11.1,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 214,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 24.1,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 96,
"IndoorRelativeHumidity": 60,
"Visibility": {
"Value": 8,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 83,
"ThunderstormProbability": 19,
"RainProbability": 83,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 2.2,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 2.2,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=1&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=1&unit=c"
},
{
"DateTime": "2024-05-30T02:00:00+02:00",
"EpochDateTime": 1717027200,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 12,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 216,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 24.1,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 96,
"IndoorRelativeHumidity": 60,
"Visibility": {
"Value": 6.4,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 518,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 25,
"ThunderstormProbability": 5,
"RainProbability": 25,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 100,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=2&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=2&unit=c"
},
{
"DateTime": "2024-05-30T03:00:00+02:00",
"EpochDateTime": 1717030800,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.4,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.4,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 218,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 24.1,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 98,
"IndoorRelativeHumidity": 60,
"Visibility": {
"Value": 6.4,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 488,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 20,
"ThunderstormProbability": 4,
"RainProbability": 20,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 99,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=3&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=3&unit=c"
},
{
"DateTime": "2024-05-30T04:00:00+02:00",
"EpochDateTime": 1717034400,
"WeatherIcon": 7,
"IconPhrase": "Nuageux",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 12.5,
"Unit": "C",
"UnitType": 17
},
"RealFeelTemperature": {
"Value": 11.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"RealFeelTemperatureShade": {
"Value": 11.5,
"Unit": "C",
"UnitType": 17,
"Phrase": "Frais"
},
"WetBulbTemperature": {
"Value": 12.4,
"Unit": "C",
"UnitType": 17
},
"WetBulbGlobeTemperature": {
"Value": 12.6,
"Unit": "C",
"UnitType": 17
},
"DewPoint": {
"Value": 12.2,
"Unit": "C",
"UnitType": 17
},
"Wind": {
"Speed": {
"Value": 9.3,
"Unit": "km/h",
"UnitType": 7
},
"Direction": {
"Degrees": 224,
"Localized": "SO",
"English": "SW"
}
},
"WindGust": {
"Speed": {
"Value": 24.1,
"Unit": "km/h",
"UnitType": 7
}
},
"RelativeHumidity": 98,
"IndoorRelativeHumidity": 60,
"Visibility": {
"Value": 6.4,
"Unit": "km",
"UnitType": 6
},
"Ceiling": {
"Value": 732,
"Unit": "m",
"UnitType": 5
},
"UVIndex": 0,
"UVIndexText": "Minimum",
"PrecipitationProbability": 20,
"ThunderstormProbability": 4,
"RainProbability": 20,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Rain": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"Snow": {
"Value": 0,
"Unit": "cm",
"UnitType": 4
},
"Ice": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"CloudCover": 99,
"Evapotranspiration": {
"Value": 0,
"Unit": "mm",
"UnitType": 3
},
"SolarIrradiance": {
"Value": 0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=4&unit=c",
"Link": "http://www.accuweather.com/fr/fr/sarreguemines/135050/hourly-weather-forecast/135050?day=2&hbhhour=4&unit=c"
}
]
One small problem is that you have to make a request for each key for each raws : the answer from the developers :
We do not currently offer such an option to request multiple API endpoints at the same time. Given that not all data updates at the same cadence (ex: Current Conditions vs Daily Forecast), not all endpoints need to be requested at the same time. By having individual API endpoints, developers can reduce unnecessary API requests for data that is not needed.
Negative points
- the weather over 5 days 0+4
- something missing in current weather
- positive points
- it's in French
- times and phases of the moon
- weather for the next 12 hours
You can mix accuweather_conky_script and accuweather_Api to get what's missing in both..
@+
Last edited by loutch (2024-05-29 15:40:00)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ Great job.
I'm glad you made it.
Do you now know how many calls are allowed per day for each API?
Last edited by marens (2024-05-29 16:06:40)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Re
50 calls per 24 hours since the first call
if the number of calls is exceeded, there will be no response until the time of the first call + 24 hours
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ When 50 calls per day are allowed for each API, then it is easy to calculate.
If you run the script every 30min (1800s) then that's 48 calls + the first one per day (49).
Maybe that's why they allow 50 calls.
In any case, the weather forecast does not change often and an update every half hour is acceptable.
P.S.
My new weather conky has no limit but the server is updated every hour for the current forecast and only once a day for the next 5 days.
I think that's fine.
If people would know how little brain is ruling the world, they would die of fear.
Offline
@loutch, this is only for you because you deserve it.
I tried removing all my local changes and I think it worked.
Notes *
1) Make the script executable
2) Don't forget to replace the address with your own
3) The required data is no longer in the temp folder and you need to change the path in conkies
4) For an hourly forecast, see my help for @unklar:
https://forums.bunsenlabs.org/viewtopic … 30#p128130
#!/usr/bin/env bash
#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -b"
#####################################
# Put your Accuweather address here #
#####################################
#address="https://www.accuweather.com/en/us/new-york/10021/weather-forecast/349727"
#address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
#address="https://www.accuweather.com/en/us/hutto/78634/weather-forecast/2110192"
#address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="https://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
#address="https://www.accuweather.com/en/aq/casey-station/2273690/weather-forecast/2273690"
#
#
#
address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#
#
#Pause weather conky
pkill -STOP -xf "$weather_conky_launch_command"
#function: test_image
test_image () {
case $1 in
1)
echo a
;;
2|3)
echo b
;;
4|5)
echo c
;;
6)
echo d
;;
7)
echo e
;;
8)
echo f
;;
11)
echo 0
;;
12)
echo h
;;
13|14)
echo g
;;
15)
echo m
;;
16|17)
echo k
;;
18)
echo i
;;
19)
echo q
;;
20|21|23)
echo o
;;
22)
echo r
;;
24|31)
echo E
;;
25)
echo v
;;
26)
echo x
;;
29)
echo y
;;
30)
echo 5
;;
32)
echo 6
;;
33)
echo A
;;
34|35)
echo B
;;
36|37)
echo C
;;
38)
echo D
;;
39|40)
echo G
;;
41|42)
echo K
;;
43|44)
echo O
;;
*)
echo -
;;
esac
}
#function: test_wind
test_wind () {
case $1 in
CLM)
echo \-
;;
S)
echo 1
;;
SSW)
echo 2
;;
SW)
echo 3
;;
WSW)
echo 4
;;
W)
echo 5
;;
WNW)
echo 6
;;
NW)
echo 7
;;
NNW)
echo 8
;;
N)
echo 9
;;
NNE)
echo \:
;;
NE)
echo \;
;;
ENE)
echo \<
;;
E)
echo \=
;;
ESE)
echo \>
;;
SE)
echo \?
;;
SSE)
echo \@
;;
esac
}
############################
# Check the user arguments #
############################
if (( $# < 1 || $# > 18 )); then
echo "Invalid arguments!"
exit
fi
forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0
h_24hours=1
h_real=1
h_uv=1
h_wind=1
h_wind_g=1
h_hum=1
h_ind_hum=1
h_dew=1
h_cl_cov=1
h_prec_am=1
h_visib=1
h_cl_ceil=1
for i in $*
do
if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 && $i != -h_12h && $i != -h_no_real && $i != -h_no_uv && $i != -h_no_wind && $i != -h_no_wind_g && $i != -h_no_hum && $i != -h_no_ind_hum && $i != -h_no_dew && $i != -h_no_cl_cov && $i != -h_no_prec_am && $i != -h_no_visib && $i != -h_no_cl_ceil ]]; then
echo "Invalid arguments!"
exit
fi
case $i in
-f)
forecast0=1
;;
-f2015)
forecast2015=1
;;
-f2016)
forecast2016=1
;;
-h)
hourly0=1
;;
-h2015)
hourly2015=1
;;
-h2016)
hourly2016=1
;;
-h_12h)
h_24hours=0
;;
-h_no_real)
h_real=0
;;
-h_no_uv)
h_uv=0
;;
-h_no_wind)
h_wind=0
;;
-h_no_wind_g)
h_wind_g=0
;;
-h_no_hum)
h_hum=0
;;
-h_no_ind_hum)
h_ind_hum=0
;;
-h_no_dew)
h_dew=0
;;
-h_no_cl_cov)
h_cl_cov=0
;;
-h_no_prec_am)
h_prec_am=0
;;
-h_no_visib)
h_visib=0
;;
-h_no_cl_ceil)
h_cl_ceil=0
;;
esac
done
if [[ $forecast0 == 1 ]]; then
forecast2015=0
forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
hourly2015=0
hourly2016=0
fi
last_number=$(echo $address|sed 's/^.*\///')
#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then
#function: convert_time
convert_time ()
{
hours=$(echo $1|awk -F ":| " '{print $1}')
minutes=$(echo $1|awk -F ":| " '{print $2}')
am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
if [[ $am_or_pm == "" ]]; then
echo $1
return 0
elif [[ $am_or_pm == AM ]]; then
if (( $hours < 10 )); then
hours_24=0$hours
fi
if (( $hours == 10 || $hours == 11 )); then
hours_24=$hours
fi
if (( $hours == 12 )); then
hours_24=00
fi
elif [[ $am_or_pm == PM ]]; then
if (( $hours != 12 )); then
hours_24=$((hours+12))
fi
if (( $hours == 12 )); then
hours_24=12
fi
fi
time_24=$hours_24:$minutes
if [[ $1 != "--" ]]; then
echo $time_24
elif [[ $1 == "--" ]]; then
echo "--"
fi
}
sleep 0.2
curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/curr_cond_raw "$curr_addr"
daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/daily_forecast_raw "$daily_addr"
##### del image forecast
if [[ $forecast2015 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/forecast_2015/forecast_*.png ]]; then
rm $HOME/Accuweather_conky_script/forecast_2015/forecast_*.png
fi
fi
if [[ $forecast2016 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/forecast_2016/forecast_*.png ]]; then
rm $HOME/Accuweather_conky_script/forecast_2016/forecast_*.png
fi
fi
sleep 0.2
#current conditions
if [[ -s $HOME/Accuweather_conky_script/curr_cond_raw ]]; then
# # sed '/current-weather-card card-module content-module non-ad/,/glacier-ad /!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp
sed '/current-weather-card/,/glacier-ad /!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp
sed -i '/div class=\"label-tooltip\" data-js/,/div class=\"current-weather-details/d' $HOME/Accuweather_conky_script/curr_cond_temp
sed -i -e 's/\.svg.*$//g' -e 's/<\/div>//g' -e 's/<div>//g' -e 's/<\/span>//g' -e 's/<span class.*$//g' -e 's/^[\t]*//g' $HOME/Accuweather_conky_script/curr_cond_temp
#sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e 's/.*RealFeel® //g' -e '/RealFeel Shade™/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp
sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e '/RealFeel®/d' -e '/RealFeel Shade™/,+1d' -e '/RealFeel Shade/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp
#
sed -i '1s/^0//' $HOME/Accuweather_conky_script/curr_cond_temp
# temporary file to control
#
cp $HOME/Accuweather_conky_script/curr_cond_temp $HOME/Accuweather_conky_script/curr_cond_control_point
if [[ $(sed -n 5p $HOME/Accuweather_conky_script/curr_cond_temp) != 'Max UV Index' ]]; then
#sed -i "5s/^/Max UV\n0\n/" $HOME/Accuweather_conky_script/curr_cond_temp
sed -i "5s/^/Max UV\n-\n/" $HOME/Accuweather_conky_script/curr_cond_temp
fi
wind_dir=$(sed -n 8p $HOME/Accuweather_conky_script/curr_cond_temp|head -c 1)
if [[ $wind_dir == 0 ]]; then
sed -i '8s/^/CLM /' $HOME/Accuweather_conky_script/curr_cond_temp
fi
sed -i '8s/ /\n/1' $HOME/Accuweather_conky_script/curr_cond_temp
# sed '/sunrise-sunset card-module content-module/,/temp-history content-module/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp1
sed '/sunrise-sunset content-module /,/temp-history content-module/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp1
# sed -i -e 's/.*"text-value">//g' -e 's/<\/span>$//g' -e '/</d' $HOME/Accuweather_conky_script/curr_cond_temp1
# sed -i -e '1d;4d' -e 's/^[\t]*//g' -e 's/ AM/:AM/g' -e 's/ PM/:PM/g' -e 's/ .*$//g' -e '/^$/d' -e 's/:AM/ AM/g' -e 's/:PM/ PM/g' $HOME/Accuweather_conky_script/curr_cond_temp1
# sed -i -e '1N;s/\n/:/' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i -e '/div/g' -e '/img/g' -e '/times-label/g' -e '/title\|Sun \|h2/g' -e 's/^[\t]*//g' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i 's/<span class="sunrise-sunset__times-value">//g' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i 's/<span class="sunrise-sunset__phrase">//g' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i 's/<\/span>//g' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i 's/ hrs /:/g' $HOME/Accuweather_conky_script/curr_cond_temp1
sed -i 's/ mins//g' $HOME/Accuweather_conky_script/curr_cond_temp1
# if [[ $(sed -n 4p $HOME/Accuweather_conky_script/curr_cond_temp1) != "--" && $(sed -n 5p $HOME/Accuweather_conky_script/curr_cond_temp1) != "--" && $(sed -n 6p $HOME/Accuweather_conky_script/curr_cond_temp1) != "--" && $(sed -n 7p $HOME/Accuweather_conky_script/curr_cond_temp1) != "--" ]]; then
# sed -i '4N;s/\n/:/' $HOME/Accuweather_conky_script/curr_cond_temp1
# fi
# sorting сортировка
# curr_cond line 1,2 номер изобр. облака и температуры сейчас , number icon and Temperature now
sed -n 1,2p $HOME/Accuweather_conky_script/curr_cond_temp > $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 3 температура ощущение Real Feel
sed -n 4p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 4 облачность Forecast
sed -n 3p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 5 направление ветра Wind Direction
sed -n 8p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 6 скорость ветра Wind Speed
#
sed -n 9p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 7 влажность Humidity
sed -n 13p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 8 давление Pressure
sed -n 17p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 9 УФ индекс UV Index
sed -n 6p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 10 облачность Cloud Cover
sed -n 19p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 11 влажность Indoor Humidity (for compatibility with old config file)
sed -n 13p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 12 точка росы Dew Point
sed -n 15p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 13 видимость Visibility
sed -n 21p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 14,15 солнце рассвет, закат Sun Rise Sun Set
sed -n 2,3p $HOME/Accuweather_conky_script/curr_cond_temp1 >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 16 солнце длит. Sunlight Duration
sed -n 1p $HOME/Accuweather_conky_script/curr_cond_temp1 >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 17 порывы ветра Wind Gusts
sed -n 11p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 18,19 луна восход, заход Moon Rise Moon Set
sed -n 5,6p $HOME/Accuweather_conky_script/curr_cond_temp1 >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 20 Moonlight Duration
sed -n 4p $HOME/Accuweather_conky_script/curr_cond_temp1 >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 21 высота облаков Cloud Ceiling
sed -n 23p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 22 #convert Image Number curr. cond. to Weather font letter curr. cond.
image=$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 23 Sun Rise-24h
sunrise_time=$(sed -n 14p $HOME/Accuweather_conky_script/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 24 Sun Set-24h
sunrise_time=$(sed -n 15p $HOME/Accuweather_conky_script/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 25 Moon Rise-24h
sunrise_time=$(sed -n 18p $HOME/Accuweather_conky_script/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
# curr_cond line 26 Moon Set-24h
sunrise_time=$(sed -n 19p $HOME/Accuweather_conky_script/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
## curr_cond line 27 convert Wind Direction curr. cond. to Wind font letter curr. cond.
wind=$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond)
echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/curr_cond
if (( $(sed -n 14p $HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
sed -i '14s/^/0/' $HOME/Accuweather_conky_script/curr_cond
fi
if (( $(sed -n 15p $HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
sed -i '15s/^/0/' $HOME/Accuweather_conky_script/curr_cond
fi
if (( $(sed -n 18p $HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
sed -i '18s/^/0/' $HOME/Accuweather_conky_script/curr_cond
fi
if (( $(sed -n 19p $HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
sed -i '19s/^/0/' $HOME/Accuweather_conky_script/curr_cond
fi
sed -i 's/--/N\/A/g' $HOME/Accuweather_conky_script/curr_cond
moonrise=$(sed -n '25p' $HOME/Accuweather_conky_script/curr_cond)
moonset=$(sed -n '26p' $HOME/Accuweather_conky_script/curr_cond)
if [[ "$moonrise" == "N/A" || "$moonset" == "N/A" ]]; then
printf "N/A" > $HOME/Accuweather_conky_script/moon_duration
else
## moonrise
moonrise_hour=$(sed -n '25p' $HOME/Accuweather_conky_script/curr_cond | awk -F':' '{print $1}')
moonrise_min=$(sed -n '25p' $HOME/Accuweather_conky_script/curr_cond | awk -F':' '{print $2}')
## moonset
moonset_hour=$(sed -n '26p' $HOME/Accuweather_conky_script/curr_cond | awk -F':' '{print $1}')
moonset_min=$(sed -n '26p' $HOME/Accuweather_conky_script/curr_cond | awk -F':' '{print $2}')
## convert to minutes
convert_moonrise=$(echo $moonrise_hour*60+$moonrise_min | bc)
convert_moonset=$(echo $moonset_hour*60+$moonset_min | bc)
## time2 - time1
diff=$(echo $convert_moonset-$convert_moonrise | bc)
if [[ $diff -ge 0 ]]; then
diff1=$(echo $diff)
else
diff1=$(echo 1440-${diff#-} | bc)
fi
## back to hours
hours=$(echo $diff1 / 60 | bc)
hours1=$(echo $diff1 / 60 | bc -l)
## back to minutes
diff_min=$(echo $hours1-$hours | bc -l)
minutes1=$(echo $diff_min*60 | bc)
minutes=$(echo $minutes1 | awk '{print int($1)}')
#### Print Moon Duration
if [[ $hours -ge 10 && $minutes -ge 10 ]]; then
printf "$hours:$minutes" > $HOME/Accuweather_conky_script/moon_duration
fi
if [[ $hours -lt 10 && $minutes -lt 10 ]]; then
printf "$hours:0$minutes" > $HOME/Accuweather_conky_script/moon_duration
fi
if [[ $hours -ge 10 && $minutes -lt 10 ]]; then
printf "$hours:0$minutes" > $HOME/Accuweather_conky_script/moon_duration
fi
if [[ $hours -lt 10 && $minutes -ge 10 ]]; then
printf "$hours:$minutes" > $HOME/Accuweather_conky_script/moon_duration
fi
fi
# Moon Duration instead of Moon Phase in curr_cond file
replacement=$(sed -n 1p $HOME/Accuweather_conky_script/moon_duration)
sed -i '20d' $HOME/Accuweather_conky_script/curr_cond
sed -i "20s%^%$replacement\n%" $HOME/Accuweather_conky_script/curr_cond
sleep 0.2
# Copy image clouds
if [[ $forecast2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2015/forecast_0.png
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2015/wind_0.png
fi
if [[ $forecast2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2016/wind_0.png
fi
fi
## delete tendency pressure
# sed -i '8s/^.*; //' $HOME/Accuweather_conky_script/curr_cond
## tendency pressure
#
sed -i -e '8s/↔/↔/g' -e '8s/↑/↑/g' -e '8s/↓/↓/g' -e '8s/↗/↗/g' -e '8s/↘/↘/g' -e '8s/↝/↝/g' $HOME/Accuweather_conky_script/curr_cond
########## location, time update
sed '/header-loc-weather">\|<p class="sub">/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/location
sed -i -e 's/^.*">//g' -e 's/<\/div>.*$//g' -e 's/<\/p>.*$//g' -e 's/,/ /' $HOME/Accuweather_conky_script/location
############
#Daily forecast
if [[ -s $HOME/Accuweather_conky_script/daily_forecast_raw ]]; then
sed '/<div class="daily-wrapper" data-qa="dailyCard0">/,/Further Ahead/!d' $HOME/Accuweather_conky_script/daily_forecast_raw > $HOME/Accuweather_conky_script/daily_forecast
# сохранить состояние погоды в файле daily_phrase
sed '/class="phrase/!d' $HOME/Accuweather_conky_script/daily_forecast > $HOME/Accuweather_conky_script/daily_phrase
sed -i -e 's/<\/div>//g' -e 's/.*>//g' $HOME/Accuweather_conky_script/daily_phrase
# удаляем блок WinterCast
sed -i '/<div class="daily-wintercast-cta">/,/div class="daily-wrapper"/d' $HOME/Accuweather_conky_script/daily_forecast
# удалить строки между collapseConnatix и connatix" class (delete alert)
sed -i '/collapseConnatix/,/connatix" class/d' $HOME/Accuweather_conky_script/daily_forecast
sed -i '/script>/d' $HOME/Accuweather_conky_script/daily_forecast
# удалить строки между alert-banners и alert-description (delete alert)
sed -i '/alert-banners/,/alert-description/d' $HOME/Accuweather_conky_script/daily_forecast
sed -i -e 's/\.svg.*$//g' -e 's/°<\/span>//g' -e 's/<\/span>//g' $HOME/Accuweather_conky_script/daily_forecast
sed -i -e 's/^.*">\///' -e 's/^.*">//' -e 's/.*weathericons\///g' -e 's/^[\t]*//g' -e '/^$/d' $HOME/Accuweather_conky_script/daily_forecast
sed -i -e '/<\|>\|fill=\|^[ ]*$\|Further Ahead/d' $HOME/Accuweather_conky_script/daily_forecast
#### вставка строк из файла phrase в файл daily_phrase ####
j=6
for (( i=1; i<=20; i+=1 ))
do
phrase=$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_phrase)
sed -i "${j}s/^/$phrase\n/" $HOME/Accuweather_conky_script/daily_forecast
((j+=7))
done
sed -i '85,$d' $HOME/Accuweather_conky_script/daily_forecast
#
# Change a short name to a long one or translate into another language
sed -i -e 's/^Sun$/Sunday/g' -e 's/^Mon$/Monday/g' -e 's/^Tue$/Tuesday/g' -e 's/^Wed$/Wednesday/g' -e 's/^Thu$/Thursday/g' -e 's/^Fri$/Friday/g' -e 's/^Sat$/Saturday/g' $HOME/Accuweather_conky_script/daily_forecast
sleep 0.2
# Copy image clouds
for (( i=1; i<=21; i+=1 ))
do
echo >> $HOME/Accuweather_conky_script/daily_forecast
done
for (( i=3; i<=80; i+=7 ))
do
image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/daily_forecast)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/daily_forecast
done
if [[ $forecast0 == 0 ]]; then
j=1
for (( i=3; i<=80; i+=7 ))
do
if [[ $forecast2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2015/forecast_$j.png
fi
if [[ $forecast2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2016/forecast_$j.png
fi
((j++))
done
fi
fi
fi
sleep 0.2
#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
#function: convert_time_h
convert_time_h ()
{
hours=$(echo $1|awk -F ":| " '{print $1}')
am_or_pm=$(echo $1|awk -F ":| " '{print $2}')
if [[ $am_or_pm == "" ]]; then
echo $1
return 0
elif [[ $am_or_pm == AM ]]; then
if (( $hours < 10 )); then
hours_24=0$hours
fi
if (( $hours == 10 || $hours == 11 )); then
hours_24=$hours
fi
if (( $hours == 12 )); then
hours_24=00
fi
elif [[ $am_or_pm == PM ]]; then
if (( $hours != 12 )); then
hours_24=$((hours+12))
fi
if (( $hours == 12 )); then
hours_24=12
fi
fi
time_24=$hours_24:00
echo $time_24
}
if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then
#Hourly: 24h
hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw1 "$hourly_addr1"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw2 "$hourly_addr2"
if [[ -s $HOME/Accuweather_conky_script/hourly_raw1 && -s $HOME/Accuweather_conky_script/hourly_raw2 ]]; then
cat $HOME/Accuweather_conky_script/hourly_raw1 $HOME/Accuweather_conky_script/hourly_raw2 > $HOME/Accuweather_conky_script/hourly_raw_temp
sed '/<div class=\"hourly-wrapper content-module\">/,/day=/!d' $HOME/Accuweather_conky_script/hourly_raw_temp > $HOME/Accuweather_conky_script/hourly
# #Hourly file
#
sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' $HOME/Accuweather_conky_script/hourly
#remove spaces and tabs in lines
# sed -i -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/hourly
sed -i '/div class=\"real-feel-mobile/,/<\/div>/d' $HOME/Accuweather_conky_script/hourly
#Поменять ® на <span class="value">space
sed -i -e 's/®/<span class="value">space/g' $HOME/Accuweather_conky_script/hourly
# и к space присоединить следующую строку(удалив space и \n- новая строка)
sed -i -z 's/space\n//g' $HOME/Accuweather_conky_script/hourly
sed -i '/Indoor Humidity\|Air Quality\|RealFeel Shade\|RealFeel Guide\|Ice/d' $HOME/Accuweather_conky_script/hourly
#
sed -i '/class="date"\|weathericons\/\|temp metric\|RealFeel<span\|"phrase"\|Max UV Index\|Wind\|Wind Gusts\|Humidity\|Dew Point\|Cloud Cover\|Visibility\|Cloud Ceiling/!d' $HOME/Accuweather_conky_script/hourly
##adding empty lines for compatibility with the old config. file
#date
sed -i -e 's/<\/span><\/h2>/\n--/g' $HOME/Accuweather_conky_script/hourly
sed -i -e 's/<\/span>.*$//g' -e 's/\.svg.*$//g' -e 's/<\/div>.*$//g' -e 's/<span class="value">/\n/g' $HOME/Accuweather_conky_script/hourly
sed -i -e 's/.*weathericons\///g' -e 's/^.*>//g' -e 's/°.*$//g' -e 's/®//g' -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/hourly
#Populate Max UV and Prec. Amount values where needed
i=1
while IFS= read -r line;
do
if [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/hourly) == Wind ]]; then
j=$((i-2))
if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Max UV Index' ]]; then
sed -i "${i}s/^/Max UV Index\n0\n/" $HOME/Accuweather_conky_script/hourly
((i+=3))
fi
elif [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/hourly) == Visibility ]]; then
j=$((i-2))
if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Rain' && $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Snow' ]]; then
sed -i "${i}s/^/Prec. Amount\n-\n/" $HOME/Accuweather_conky_script/hourly
((i+=3))
fi
fi
((i+=1))
done < $HOME/Accuweather_conky_script/hourly
sed -i '/^$/d' $HOME/Accuweather_conky_script/hourly
##adding empty lines for compatibility with the old config. file
sed -i '/Dew Point/i Indoor Hum.\n0' $HOME/Accuweather_conky_script/hourly
sed -i '/Max UV Index/i precip\n-\nNot' $HOME/Accuweather_conky_script/hourly
sed -i '/^Further Ahead$/d' $HOME/Accuweather_conky_script/hourly
sed -i '721,$d' $HOME/Accuweather_conky_script/hourly
sed -i -e 's/ mph$\| km\/h$//g' -e 's/°.*$//g' $HOME/Accuweather_conky_script/hourly
##### del image hourly
if [[ $hourly2015 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/hourly_2015/hourly_*.png ]]; then
rm $HOME/Accuweather_conky_script/hourly_2015/hourly_*.png
fi
fi
if [[ $hourly2016 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/hourly_2016/hourly_*.png ]]; then
rm $HOME/Accuweather_conky_script/hourly_2016/hourly_*.png
fi
fi
# # Convert number image hourly to Weather font letter. Copy image clouds
for (( i=3; i<=720; i+=30 ))
do
image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/hourly)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/hourly
sed -i "$(( i+9 ))s/ .*$//" $HOME/Accuweather_conky_script/hourly
sed -i "$(( i+17 ))s/ .*$//" $HOME/Accuweather_conky_script/hourly
done
if [[ $hourly0 == 0 ]]; then
j=1
for (( i=3; i<=720; i+=30 ))
do
if [[ $hourly2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly).png $HOME/Accuweather_conky_script/hourly_2015/hourly_$j.png
fi
if [[ $hourly2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly).png $HOME/Accuweather_conky_script/hourly_2016/hourly_$j.png
fi
((j++))
done
fi
fi
# Convert times in hourly from am/pm to freedom times
for (( i=1; i<=720; i+=30 ))
do
h=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i ${i}s/^.*$/$(convert_time_h "$h")/ $HOME/Accuweather_conky_script/hourly
# # Add times in hourly :0 ru version
# sed -i ${i}s/^.*$/"$h":00/ $HOME/Accuweather_conky_script/hourly
done
sleep 0.2
##convert Wind Direction hourly to Wind font letter hourly
echo 'Font letter wind hourly ' >> $HOME/Accuweather_conky_script/hourly
j=1
for (( i=14; i<=720; i+=30 ))
do
wind=$(sed -n "${i}"p $HOME/Accuweather_conky_script/hourly | awk '{print $1}')
echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/hourly
((j++))
done
##############################################################
# Full info, next 24h - altogether24 file
#
if [[ -f $HOME/Accuweather_conky_script/altogether24 ]]; then
#
rm $HOME/Accuweather_conky_script/altogether24
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/altogether24_2015 ]]; then
#
rm $HOME/Accuweather_conky_script/altogether24_2015
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/altogether24_2016 ]]; then
#
rm $HOME/Accuweather_conky_script/altogether24_2016
#
fi
#TIME
echo "\${color1}TIME\${goto 100}$(sed -n 1p $HOME/Accuweather_conky_script/hourly)" > $HOME/Accuweather_conky_script/altogether24
jump_to=160
for (( i=31; i<=360; i+=30 ))
do
time=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=361; i<=720; i+=30 ))
do
time=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
sed -i '1s/$/\n\n\n/' $HOME/Accuweather_conky_script/altogether24
#FORECAST
echo "\${color1}FORECAST\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=7; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=367; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
sed -i '5s/$/\n/' $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=7; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=367; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#TEMPERATURE
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "TEMPER.\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=4; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=364; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#REAL FEEL
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "REAL FEEL\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=6; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=366; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#CHANCE OF PRECIPITATION
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "PRECIP. %\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=9; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=369; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#MAX UV INDEX
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "UV INDEX\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=12; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=372; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#WIND
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "WIND\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=14; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=374; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#WIND GUSTS
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "WIND GUSTS\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=16; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=376; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#HUMIDITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "HUMIDITY\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=18; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=378; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#INDOOR HUMIDITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "IND. HUMID.\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=20; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=380; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#DEW POINT
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "DEW POINT\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=22; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=382; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#CLOUD COVER
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "CLOUD CVR\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=24; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=384; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#PRECIPITATION AMOUNT
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "PREC. AM.\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=26; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=386; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#VISIBILITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "VISIBILITY\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=28; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=388; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#CLOUD CEILING
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
echo "CLOUD CEIL.\${color}" >> $HOME/Accuweather_conky_script/altogether24
jump_to=100
for (( i=30; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=390; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
#IMAGES
if [[ $hourly0 == 0 ]]; then
if [[ $hourly2015 == 1 ]]; then
jump_to=75
cp $HOME/Accuweather_conky_script/altogether24 $HOME/Accuweather_conky_script/altogether24_2015
fi
if [[ $hourly2016 == 1 ]]; then
jump_to=85
cp $HOME/Accuweather_conky_script/altogether24 $HOME/Accuweather_conky_script/altogether24_2016
fi
# if [[ -f $HOME/Accuweather_conky_script/altogether24 ]]; then
# rm $HOME/Accuweather_conky_script/altogether24
# fi
hours=$((12+$h_24hours*12))
for (( i=1; i<=$hours; i+=1 ))
do
if [[ $hourly2015 == 1 ]]; then
sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/altogether24_2015
fi
if [[ $hourly2016 == 1 ]]; then
sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/altogether24_2016
fi
((jump_to+=60))
done
fi
#CONKYFONT
if [[ $hourly0 == 1 ]]; then
sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/Accuweather_conky_script/altogether24
jump_to=95
for (( i=721; i<=732; i+=1 ))
do
sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=733; i<=744; i+=1 ))
do
sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)/" $HOME/Accuweather_conky_script/altogether24
((jump_to+=60))
done
fi
sed -i '4s/$/\${font}/' $HOME/Accuweather_conky_script/altogether24
sed -i '2,3d' $HOME/Accuweather_conky_script/altogether24
fi
#DELETE UNWANTED VARIABLES
if [[ $h_real == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '7,8s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_uv == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_wind == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_wind_g == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_hum == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_ind_hum == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_dew == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_cl_cov == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_prec_am == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_visib == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ $h_cl_ceil == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
if [[ -f $HOME/Accuweather_conky_script/altogether24 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/altogether24
fi
if [[ -f $HOME/Accuweather_conky_script/altogether24_2015 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/altogether24_2015
fi
if [[ -f $HOME/Accuweather_conky_script/altogether24_2016 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/altogether24_2016
fi
fi
sleep 0.5
##################################################################
#del. temp files
#
if [[ -f $HOME/Accuweather_conky_script/curr_cond_temp ]]; then
#
rm $HOME/Accuweather_conky_script/curr_cond_temp
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/curr_cond_temp1 ]]; then
#
rm $HOME/Accuweather_conky_script/curr_cond_temp1
#
fi
# if [[ -f $HOME/Accuweather_conky_script/curr_cond_control_point ]]; then
# rm $HOME/Accuweather_conky_script/curr_cond_control_point
# fi
#
if [[ -f $HOME/Accuweather_conky_script/hourly_raw_temp ]]; then
#
rm $HOME/Accuweather_conky_script/hourly_raw_temp
#
fi
###############################################################
#del. raw files
# if [[ -f $HOME/Accuweather_conky_script/curr_cond_raw ]]; then
# rm $HOME/Accuweather_conky_script/curr_cond_raw
# fi
# if [[ -f $HOME/Accuweather_conky_script/daily_forecast_raw ]]; then
# rm $HOME/Accuweather_conky_script/daily_forecast_raw
# fi
# if [[ -f $HOME/Accuweather_conky_script/hourly_raw1 ]]; then
# rm $HOME/Accuweather_conky_script/hourly_raw1
# fi
# if [[ -f $HOME/Accuweather_conky_script/hourly_raw2 ]]; then
# rm $HOME/Accuweather_conky_script/hourly_raw2
# fi
#
##################################################################
#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"
Last edited by marens (2024-10-27 00:45:41)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
@ marens
Many tanks work great
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Hello marens , loutch
My accuweather fork, now in French.
Offline
Hello
@ marens
Many tanks work great
@+
You always selflessly share your knowledge and experience with others.
It was not difficult for me to make some time for you.
Now you don't have a limited number of calls.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello marens , loutch
My accuweather fork, now in French.
Hi @il.harun.
Nice to see you here again.
You have done a lot for the fans of this script.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
@ marens
After a fiew hours , script is working great .
I permice me to delete the altogether completly & uncomment the del. raws files
it's a bit clearer in my accuweather_conky_script folder.
with accuweather -f2015 no error in konsole
with -h2015 i confirm this
For an hourly forecast, see my help for @unklar:
https://forums.bunsenlabs.org/viewtopic … 30#p128130
Of course, errors in the terminal remain because the basic script is not working properly.
For the main thing is that my conkys work correctly & that I no longer have a limit on the number of calls
Manys thanks again
and
@+
Last edited by loutch (2024-05-31 08:51:32)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline