You are not logged in.
Hello
Marens, I looked for “sunrise” and “sunset” in the raw file but couldn't find them. Could you tell me where they are?
marrens_rss.sh
#!/bin/bash
### create by marens from bunsenlabs forum & modify by me for french
# Go to https://www.timeanddate.com/weather
# Find your address in the search field.
# Copy the address from the Firefox URL bar and paste it in the same form here instead of Paris, France.
address="https://www.timeanddate.com/weather/@6454374"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address" > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw
#### NOW
## Temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]class=h2>[^<]*' | sed 's/^/Temperature:/' | sed 's/class=h2>//' | sed 's/ / /' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Feels Like
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[F^]eels Like:[^<]*' | sed 's/ / /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e '3s/$/ °C/' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Forecast
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]title="High and low forecasted temperature today">Forecast: [^ ]*' | awk -F'>' '{print $2}' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e '3s/$/°C/' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Text Now
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]id=cur-weather class=mtt title="[^"]*' | sed 's/ id=cur-weather class=mtt title="//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Visibility
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[V^]isibility: [^P]*' | sed 's/<\/th><td>//' | sed 's/ / /' | sed 's/<\/td><\/tr><tr><th>//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Pressure
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[P^]ressure: [^H]*' | sed 's/<\/th><td>//' | sed 's/<\/td><\/tr><tr><th>//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Humidity
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[H^]umidity:[^D]*' | sed '$d' | sed 's/<\/th><td>//' | sed 's/<\/td><\/tr><tr><th>//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Dew Point
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[D^]ew Point: [^ ]*' | sed 's/<\/th><td>//' | sed 's/ / /' | sed 's/<\/td><\/tr><\/tbody><\/table><\/div><div//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Wind
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[W^]ind: [^<]*' | sed '$d' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Wind Direction
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[>^] from[^<]*' | sed '$d' | sed 's/> //' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
## Latest Report
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[L^]atest Report: [^V]*' | sed 's/<\/th><td>//' | sed 's/<\/td><\/tr><tr><th>//' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
### Traduction ####
sed -i -e 's/Temperature/Température/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Feels Like/Ressentie/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Forecast/Maxi et mini/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Visibility/Visibilité/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Pressure/Pression/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Humidity/Humidité/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Dew Point/Point de rosée/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Wind/Vent/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e 's/Latest Report:/Mise @ jour/g' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -n '4p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | trans -brief :fr >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
#### direction du vent #####
sed -n '10p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | trans -brief :fr >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
# 1. Copier la ligne 13 vers la fin (ligne 14)
sed -n '13p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
sed -i -e '14s/.*nord-nord-est.*/NNE/gI' \
-e '14s/.*nord-nord-ouest.*/NNO/gI' \
-e '14s/.*sud-sud-est.*/SSE/gI' \
-e '14s/.*sud-sud-ouest.*/SSO/gI' \
-e '14s/.*est-nord-est.*/ENE/gI' \
-e '14s/.*est-sud-est.*/ESE/gI' \
-e '14s/.*ouest-nord-ouest.*/ONO/gI' \
-e '14s/.*ouest-sud-ouest.*/OSO/gI' \
-e '14s/.*nord-est.*/NE/gI' \
-e '14s/.*nord-ouest.*/NO/gI' \
-e '14s/.*sud-est.*/SE/gI' \
-e '14s/.*sud-ouest.*/SO/gI' \
-e '14s/.*nord.*/N/gI' \
-e '14s/.*sud.*/S/gI' \
-e '14s/.*ouest.*/O/gI' \
-e '14s/.*est.*/E/gI' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now
#### Images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '1q;d' | sed 's/ src="/https:/' | sed 's/.$//' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
day_0=$(sed -n '1p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images | awk -F'svg/' '{print $2}' | sed 's/svg/png/')
cp /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/tad-icons/$day_0 /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/0.png
> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
## Wind Direction
wd=$(sed -n '10p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | sed 's/from //' | sed 's/North/N/g' | sed 's/north/N/g' | sed 's/South/S/g' | sed 's/south/S/g' | sed 's/East/E/g' | sed 's/east/E/g' | sed 's/West/W/g' | sed 's/west/W/g' | sed 's/-//' | sed 's/$/.png/')
if [[ "$wd" == ".png" ]]; then
cp /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/wind/CLM.png /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/wind_0.png
else
cp /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/wind/$wd /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/wind_0.png
fi
############
## Daily Date + Phrase - Next 7 Days
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $2}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $3}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $4}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $5}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $6}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $7}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'View historic weather' | awk -F'ext')"><div class=wt-dn>' '{print $8}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
#### DAY + DATE (Next 7 Days)
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address/ext" > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date-raw
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date-raw | grep -o '[,^]"ds":"[^"]*' | sed 's/,"ds":"//g' | sed 's/\.//g' | sed -n '1,7p' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date
### Traduction ####
sed -n 'p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase | trans -brief :fr >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/date_and_phrase
## Daily Forecast Images - Next 7 Days
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '19q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '20q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '21q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '22q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '23q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '24q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '25q;d' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images
j=1
for (( i=1; i<=7; i+=1 ))
do
cp /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/tad-icons/$(sed -n ${i}p /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/images) /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_$j.png
((j++))
done
## Temperatures - Next 7 days
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[^ ]*width=60 height=60><p>[^ ]*' | sed 's/width=60 height=60><p>//' | sed 7q > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures
## Phrase (Next 7 Days)
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]class=mtt title="[^"]*' | sed -n '18,24p' | sed 's/ class=mtt title="//' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/phrase
### Traduction ####
sed -n 'p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/phrase | trans -brief :fr >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/phrase
#### HOURLY
## Images
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | awk -F'svg/' '{print $2}' | sed -n '3,7p' | sed 's/.$//' | sed 's/svg/png/' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/images
## Temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'tr class="h2 soft"' | awk -F'height=80></td></tr><tr class="h2 soft" ><td>' '{print $2}' | awk -F'</td><td>' '{print $2}' | sed 's/ / /' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'tr class="h2 soft"' | awk -F'height=80></td></tr><tr class="h2 soft" ><td>' '{print $2}' | awk -F'</td><td>' '{print $3}' | sed 's/ / /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'tr class="h2 soft"' | awk -F'height=80></td></tr><tr class="h2 soft" ><td>' '{print $2}' | awk -F'</td><td>' '{print $4}' | sed 's/ / /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'tr class="h2 soft"' | awk -F'height=80></td></tr><tr class="h2 soft" ><td>' '{print $2}' | awk -F'</td><td>' '{print $5}' | sed 's/ / /' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep 'tr class="h2 soft"' | awk -F'height=80></td></tr><tr class="h2 soft" ><td>' '{print $2}' | awk -F'</td><td>' '{print $6}' | sed 's/ / /' | awk -F'</td></tr>' '{print $1}' >> /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature
## Hourly Time
cat /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/weather_raw | grep -o '[ ^]class=h2 ><td>Now</td><td>[^r]*' | sed -e 's/<\/td><td>/\n/g' | sed '1,1d' | sed 's/<\/td><\/t//' > /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/time
## Icons
j=1
for (( i=1; i<=5; i+=1 ))
do
cp /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/tad-icons/$(sed -n ${i}p /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/images) /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_$j.png
((j++))
done
exitconky
conky.config = {
background = true,
use_xft = true,
font = 'Liberation Sans:size=7',
xftalpha = 1,
update_interval = 1.0,
total_run_times = 0,
own_window = true,
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 0, -- 0 transparent 255 plein
own_window_type = 'normal',
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,',
double_buffer = true,
minimum_width = 450, minimum_height = 300,
maximum_width = 450,
text_buffer_size = 2048,
draw_shades = true,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
default_color = 'white',
default_outline_color = 'white',
alignment = 'top_middle',
gap_x = 0,
gap_y = 50,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
override_utf8_locale = true,
imlib_cache_flush_interval = 60,
imlib_cache_size = 10000,
stippled_borders = 5,
default_shade_color = '#333333',
default_outline_color = 'black',
lua_load = '/mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/scripts/loader.lua',
lua_draw_hook_pre = 'loader_lua',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '828200',
color4 = '323200',
color5 = 'fdb72e',
color7 = '6495ee',
color9 = 'red',
};
conky.text = [[ ${execi 900 bash /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/scripts/rss.sh}\
${execpi 5000 /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/scripts/moonmini.sh}
${font liquid crystal :style=bold:size=52}${color 434343}${goto 42}${time %H}${goto 152}${time %M}${font :size=20}${color 808080}${goto 235}${time %S}$font
${voffset -60}${color white}${font GE Inspira:size=9}${alignc -108}${time %A, %d %B %Y}$font
${alignc -108}${font :size=8}Dernière mise à jour : ${execpi 600 sed -n '11p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | cut -c24-31}
${voffset 46}${goto 20}${font :style=Bold:size=8}Aujourd'hui St :${font :size=8}${texeci 1000 wget -O - -q http://fetedujour.fr/ --user-agent="Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0" | grep h2 | head -1 | cut -d">" -f2 | cut -d"<" -f1 | cut -d":" -f2 }
${voffset -60}${goto 310}${font :style=Bold:size=8}Vent: ${texeci 600 sed -n '14p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now}
${goto 310}Vitesse: ${texeci 600 sed -n '9p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | awk '{print $2}'} km/h
${goto 310}Rosée: ${texeci 600 sed -n '8p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | awk '{print $4}'} °C
${goto 310}${texeci 600 sed -n '5p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now}
${goto 310}${texeci 600 sed -n '7p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now}
${goto 310}${texeci 600 sed -n '6p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now}
${goto 310}${texeci 600 sed -n '3p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now}${voffset -48}
${goto 20}Folpersviller: ${font :size=8}${execi 600 sed -n '12p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now} $font
${goto 16}Temp.: ${execi 600 sed -n '1p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | awk '{print $2}'} °C Res.: ${execi 600 sed -n '2p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/now | awk '{print $2}'} °C
${goto 16}Soleil ↑ ↓
${goto 16}Lune ${texeci 600 sed -n '3p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/raws/lune}
###### six prochaines heures ####
${voffset -10}
${goto 30}${execi 600 date -d '+1 hour' '+%H'}h\
${goto 125}${execi 600 date -d '+2 hour' '+%H'}h\
${goto 230}${execi 600 date -d '+3 hour' '+%H'}h\
${goto 325}${execi 600 date -d '+4 hour' '+%H'}h\
${goto 425}${execi 600 date -d '+5 hour' '+%H'}h
${goto 25}${color7}${execpi 600 sed -n '1p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature}\
${goto 122}${color7}${execpi 600 sed -n '2p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature}\
${goto 227}${color7}${execpi 600 sed -n '3p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature}\
${goto 320}${color7}${execpi 600 sed -n '4p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature}\
${goto 420}${color7}${execpi 600 sed -n '5p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/temperature}${color}
##### six prochains jours ###
${voffset 30}
${goto 28}${execi 3600 echo `date --date="0 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="0 day" | awk '{print $2}'`}\
${goto 95}${execi 3600 echo `date --date="1 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="1 day" | awk '{print $2}'`}\
${goto 170}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}\
${goto 245}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`}\
${goto 320}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $2}'`}\
${goto 400}${execi 3600 echo `date --date="5 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="5 day" | awk '{print $2}'`}
${goto 25}${color7}${execpi 600 sed -n '1p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '1p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°\
${goto 100}${color7}${execpi 600 sed -n '2p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '2p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°\
${goto 175}${color7}${execpi 600 sed -n '3p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '3p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°\
${goto 250}${color7}${execpi 600 sed -n '4p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '4p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°\
${goto 325}${color7}${execpi 600 sed -n '5p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '5p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°\
${goto 405}${color7}${execpi 600 sed -n '6p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $3}'}°${color}/${color9}${execpi 600 sed -n '6p' /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/temperatures | awk '{print $1}'}°${color}
#### Affichage utilisés dans le conky ####
${lua conky_draw_bg 30 10 4 450 300 0x000000 0.2}
#${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/fond/base5.png 0 40 470 210}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/fond/flip_bg.png 22 3 100 100}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/fond/flip_bg.png 132 3 100 100}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/0.png 190 90 117 70}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/compas.png 400 50 60 60}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/wind_0.png 400 50 60 60}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_1.png 010 190 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_2.png 096 190 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_3.png 195 190 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_4.png 292 190 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/hourly/hourly_5.png 388 190 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_1.png 10 262 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_2.png 80 262 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_3.png 155 262 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_4.png 230 262 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_5.png 305 262 70 42}
${lua fDrawImage /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b/Accuweather/accuweather_marens_rss/day_6.png 388 262 70 42}
${voffset -1000}
]];many tanks
@+
Last edited by loutch (2026-04-03 16:05:27)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Online
^ If you visit the website (weather), you will see that there is no information about the sun and moon.
That data is located elsewhere on the TAD website.
This is for Paris, France:
https://www.timeanddate.com/astronomy/france/paris
I could easily download that data, but I didn't want to send additional requests to the TAD server.
P.S.
If I remember correctly, I already gave you a script that downloads an image of the moon with the real-time illumination angle for your location.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Re
Yes, I understand, I'll manage without it
As for the moon, yes, I'm using it for another Conky.
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Online
The TAD site uses CustomWeather as a source.
CustomWeather uses MyForecast as a source.
On that long journey TAD > CustomWeather > MyForecast some locations disappear and the nearest airport appears instead.
Also, the sun and moon data are disappearing.
Updates are rare for some locations.
So I went to the main source and created a new script for MyForecast.
Intermediaries are avoided.
Details are here:
https://forums.bunsenlabs.org/viewtopic.php?id=9771
P.S.
Don't worry, I will continue to maintain the TAD script because it works great for most locations.
If people would know how little brain is ruling the world, they would die of fear.
Offline
@marens
For the past 2 days, my TAD script has been generating empty text files with no weather data.
It's not the same problem as with MyForecast site -- there is no geoblocking. I can still access the timeanddate.com site from my location.
Offline
^ Yes.
I can confirm.
I tried in the terminal (for Paris, France):
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' "https://www.timeanddate.com/weather/france/paris" > index.htmlThen right-click on the ~/index.html file > Open With Firefox.
I got this:
When you hover your mouse over the Report a Problem button, the address appears and you can see that captcha is enabled.
Honestly, at this point I don't know if there's any way around it.
Standard curl cannot bypass CAPTCHAs directly because it is a command-line tool that cannot execute the complex JavaScript or simulate the human-like behavior required to solve modern challenges like reCAPTCHA or Cloudflare Turnstile.
EDIT
I checked the response headers and I think this is the reason.
Response Headers (420 B):
---
server: cloudflare
---P.S.
I hope you will have access to the MyForecast website soon.
Maybe it's a problem with your ISP?
Try contacting your internet provider.
Good luck!
Last edited by marens (2026-04-22 14:48:20)
If people would know how little brain is ruling the world, they would die of fear.
Offline
I see. Thanks anyway.
Looks like I'm back to using openweathermap, accuweather (until it breaks again) and wunderground conkies.
Offline
What to say at the end?
As the author of the TAD script, I want to thank everyone who has used it, and especially the guys who sent feedback and helped me make the script better.
After almost #250 posts and 24,000 views, it really does seem like we're at the end, but we're not.
Not knowing this would happen, I created the MyForecast script:
https://forums.bunsenlabs.org/viewtopic.php?id=9771
The TAD website uses MyForecast as its main source.
Just switch to the MyForecast script.
I hope our friend @asqwerth will resolve the issues with accessing the MyForecast website and join us soon.
Thank you all, once again. ![]()
Last edited by marens (2026-04-23 01:00:20)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Do miracles happen?
Yes, but rarely.
It just happened.
I decided not to give up trying to save the TAD script.
After checking what can be tried with the wget command to get around the "cloudflare/captcha problem", I found this:
# 1. First, get the cookies using a browser (via extensions like "Get cookies.txt")
# 2. Then use wget with the cookies and a proper user-agent
wget --load-cookies cookies.txt \
--user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" \
"URL"
After a few minutes, the TAD script/conky is working again:
Last edited by marens (Today 01:15:29)
If people would know how little brain is ruling the world, they would die of fear.
Offline
@asqwerth and all others:
Note *
Unfortunately, after a few updates it doesn't work again, but try it anyway.
Tomorrow I will try to eliminate the failed attempts and save the data.
You only need to replace the two curl lines to fix the TAD script.
Replace:
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address" > $HOME/time_and_date_conky_script/weather_rawWith:
wget -O "$HOME/time_and_date_conky_script/weather_raw" --load-cookies cookies.txt --user-agent="Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0" "$address"Then replace:
#### DAY + DATE (Next 7 Days)
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address/ext" > $HOME/time_and_date_conky_script/date-rawWith:
#### DAY + DATE (Next 7 Days)
wget -O "$HOME/time_and_date_conky_script/date_raw" --load-cookies cookies.txt --user-agent="Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0" "$address/ext"Done.
Keep enjoying the excellent TAD script. ![]()
Last edited by marens (Today 04:34:57)
If people would know how little brain is ruling the world, they would die of fear.
Offline
I made the changes to the script but it didn't work. I even installed the cookies.txt extension in Firefox to see if it helps, but nope.
I'll continue to check this thread for more updates. Thanks, marens.
Offline
^ I did not install the extension in Firefox.
Currently the TAD script works with the above changes.
This is how it looks after two updates.
As you can see, the "Now" section is not updated on the TAD website (my location) as usual. ![]()
EDIT
The 14:00 update just arrived.
END of EDITING
You have to wait 10 minutes to see the result in conky:
${texeci 600 sed -n '4p' $HOME/time_and_date_conky_script/now}A quick way is to check the files: "now", phrase, temperature... and see if everything is fine.
However, I know that there will be failed attempts.
I will try to make the script ignore the failed attempts and keep all the files intact.
I really have no idea why the above changes sometimes don't work.
It would help if someone who is more familiar with the wget command gets involved.
We need to download the data from https://www.timeanddate.com/weather/france/paris into the home folder as weather_raw.
Last edited by marens (Today 13:24:00)
If people would know how little brain is ruling the world, they would die of fear.
Offline
I've let the conky and script run for 5 hours now, and I still have empty data files.
Let's see what happens tomorrow. Website is accessible so it's not a geoblock issue.
Offline