You are not logged in.

#4641 Today 15:09:31

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,712

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

loutch wrote:

Hello

Very good Job as well

Here mine in complety french

https://thumbs2.imgbox.com/1a/38/GO5IaQgj_t.png

Just ad this in ~/accuweather_marens_rss/rss.sh

### Traduction ####
sed -i -e 's/Temperature/Température/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Feels Like/Ressentie/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Forecast/Maxi et mini/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Visibility/Visibilité/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Pressure/Pression/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Humidity/Humidité/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Dew Point/Point de rosée/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Wind/Vent/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Latest Report:/Mise @ jour/g' $HOME/accuweather_marens_rss/now
sed -n  '4p' $HOME/accuweather_marens_rss/now | trans -brief :fr  >> $HOME/accuweather_marens_rss/now
sed -n '10p' $HOME/accuweather_marens_rss/now | trans -brief :fr  >> $HOME/accuweather_marens_rss/now

Mini-mini

https://thumbs2.imgbox.com/71/84/lVQ64UXH_t.png

@+

@loutch,
Pourquoi cela fonctionne-t-il chez toi ? Où as-tu placé le script ?

Chez moi, c'est « la fin du terrain » : https://forums.bunsenlabs.org/viewtopic … 93#p146193
Actuellement, j'ai activé ceci : https://forums.bunsenlabs.org/viewtopic … 06#p146306
XnLYJnht.png


Malheureusement, c'est très imprécis, car timeanddate obtient les données météorologiques avec le code OACI de l'aérodrome d'Altenburg-Nobis, qui se trouve à environ 40 km de chez moi.

===================================
@loutch,
Why does it work for you? Where do you have the script located?

For me, it's “game over”:
I currently have this activated:
--
Unfortunately, it's very inaccurate because timeanddate obtains the weather data using the ICAO code for the airport in Altenburg-Nobis, which is about 40 km away from me.

Offline

#4642 Today 15:19:58

loutch
Member
Registered: 2015-12-12
Posts: 899

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Hello

vor dem Bildteil

Der ganze script

#!/bin/bash


# 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" > $HOME/accuweather_marens_rss/weather_raw

#### NOW

cat $HOME/accuweather_marens_rss/weather_raw | grep 'height=80><div class=h2>' | awk -F'&nbsp;°C' '{print $1}' | awk -F'h2>' '{print $2}' > $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Feels Like: ' | awk -F'&nbsp;°C' '{print $2}' | awk -F'class=clear><p>' '{print $2}' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Forecast: ' | awk -F'&nbsp;°C' '{print $3}' | awk -F'">' '{print $2}' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Feels Like: ' | awk -F'&nbsp;°C' '{print $1}' | awk -F'"' '{print $4}' | sed 's/.$//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Visibility:' | awk -F'&nbsp;km</td>' '{print $1}' | awk -F'</td></tr><tr><th>' '{print $4}' | sed 's/<\/th><td>//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Pressure:' | awk -F'mbar</td></tr><tr><th>Humidity:' '{print $1}' | awk -F'</td></tr><tr><th>' '{print $5}' | sed 's/<\/th><td>//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Visibility:' | awk -F'%' '{print $1}' | awk -F'mbar</td></tr><tr><th>' '{print $2}' | sed 's/<\/th><td>//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep 'Visibility:' | awk -F'%' '{print $2}' | awk -F'&nbsp;°C' '{print $1}' | sed 's/<\/td><\/tr><tr><th>//' | sed 's/<\/th><td>//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep '<span title="High and low forecasted temperature today">Forecast:' | awk -F'&nbsp;°C</span><br>' '{print $2}' | awk '{print $1, $2, $3}' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep '<span title="High and low forecasted temperature today">Forecast:' | awk -F'&nbsp;°C</span><br>' '{print $2}' | awk -F'>↑</span>' '{print $2}' | awk -F'</p><' '{print $1}' | sed 's/^[ \t]*//' >> $HOME/accuweather_marens_rss/now

cat $HOME/accuweather_marens_rss/weather_raw | grep '</td></tr><tr><th>Latest Report:' | awk -F'</td></tr><tr><th>' '{print $3}' | sed 's/<\/th><td>//' >> $HOME/accuweather_marens_rss/now

sed -i -e '1s/$/ °C/' -e '1s/^/Temperature: /' -e '2s/$/ °C/' -e '3s/$/ °C/' -e '5s/$/ km/' -e '6s/$/mbar/' -e '7s/$/%/' -e '8s/$/ °C/' $HOME/accuweather_marens_rss/now

### Traduction ####
sed -i -e 's/Temperature/Température/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Feels Like/Ressentie/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Forecast/Maxi et mini/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Visibility/Visibilité/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Pressure/Pression/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Humidity/Humidité/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Dew Point/Point de rosée/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Wind/Vent/g' $HOME/accuweather_marens_rss/now
sed -i -e 's/Latest Report:/Mise @ jour/g' $HOME/accuweather_marens_rss/now
sed -n  '4p' $HOME/accuweather_marens_rss/now | trans -brief :fr  >> $HOME/accuweather_marens_rss/now
sed -n '10p' $HOME/accuweather_marens_rss/now | trans -brief :fr  >> $HOME/accuweather_marens_rss/now

#### Images

cat $HOME/accuweather_marens_rss/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed '1q;d' | sed 's/ src="/https:/' | sed 's/.$//' > $HOME/accuweather_marens_rss/images

day_0=$(sed -n '1p' $HOME/accuweather_marens_rss/images)

curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s -o $HOME/accuweather_marens_rss/0.png "$day_0"

convert $HOME/accuweather_marens_rss/0.png -transparent white $HOME/accuweather_marens_rss/0.png

> $HOME/accuweather_marens_rss/images

exit

-------------------------

before the images part.

@+


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

#4643 Today 15:27:52

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,712

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Ah, désolé, j'ai mal compris -->

cat $HOME/accuweather_marens_rss/weather_raw...

Si c'est timeanddate.com, ça ne m'aide pas non plus. 

------------
Ah, sorry, I misunderstood -->
If it's timeanddate.com, then it's not any more accurate for me either.

Offline

#4644 Today 15:36:30

loutch
Member
Registered: 2015-12-12
Posts: 899

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Re

ya es ist timeanddate.com.


Ich habe auch dies mit accuweather_fr für einen Anschein von accuweather.rss

${execpi 3600 bash $HOME/Accuweather_conky_script_fr/accuweather -f2015}
${voffset -16}${color 48bcff}${goto 70}Sarreguemines $color}
${goto 75}${execi 600 sed -n '2p' $HOME/Accuweather_conky_script_fr/curr_cond}°C (${execi 600 sed -n '3p' $HOME/Accuweather_conky_script_fr/curr_cond}°C)
${goto 75}${execi 600 sed -n '4p' $HOME/Accuweather_conky_script_fr/curr_cond} 


${color 48bcff}Aujourd'hui  ${execi 3600 date --date="0 day" | awk '{print $1""$2}'}$color${voffset 20}
${goto 75}Max: ${execpi 600 sed -n  '4p' $HOME/Accuweather_conky_script/daily_forecast}°C   Min: ${execpi 600 sed -n  '5p' $HOME/Accuweather_conky_script/daily_forecast}°C ${voffset 10}
${goto 15}${execi 600 sed -n '6p' $HOME/Accuweather_conky_script_fr/daily_forecast | fmt -w 75 | sed -n '1p'}
${goto 15}${execi 600 sed -n '2p' $HOME/Accuweather_conky_script_fr/daily_forecast | fmt -w 75 | sed -n '2p'}
${goto 15}${execi 600 sed -n '2p' $HOME/Accuweather_conky_script_fr/daily_forecast | fmt -w 75 | sed -n '3p'}

${lua fDrawImage $HOME/Accuweather_conky_script_fr/forecast_2015/forecast_0.png  0 015 83 50}
${lua fDrawImage $HOME/Accuweather_conky_script_fr/forecast_2015/forecast_1.png  0 076 83 50}






@+

Last edited by loutch (Today 16:02:25)


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

#4645 Today 16:04:02

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,126
Website

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@marens  Hello and good day! 

It looks good, but the Dew Point (line 8) is gone or did you remove it?
I don't know what happened but I tried to extract it from your weather_raw file again.

Yep. I figured you had just left the blank line removal out, along with the extra '%' in the humidity line, so removed both.  One with a simple sed removal line, and the other through adjustment.  I was unaware of the dew point display, and thought you just left a blank line.  I'll need to adjust it further when I get a chance I guess.

the images should look something like this:

In order for my conky to look like yours, I will need your conky.conf.  I do not know where that is located.  Looked through the previous pages a bit but didn't see where you linked to it, or indicated where it could be found. 

Lots of people don't like sharing, so I don't bother asking anymore.  The original moon script doesn't look like yours either.

The illuminated part of the Moon should be at the same tilt as in conky (or in the sky).

If you look at the screenshot I provided in the post from yesterday, you will see that the moons have a angled line for the indication.  Is that supposed to be there?

Then, in this screenshot below, the borders around the moons are off. The images are not smooth.

moon3.png

Thanks for all your help, but please don't worry about this any longer.  I've spent enough of your time, and have other items that need attention as well.  I'll do more when I get a chance. smile

Offline

Board footer

Powered by FluxBB