You are not logged in.

#81 2026-12-03 00:00:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,356

Re: Conky Weather: MyForecast Script

ceeslans wrote:

thought I was losing my mind, and puzzled what caused all these errors messages...
@marens to the rescue... terima kasih banyak !

Untungnya, skrip tersebut kembali berfungsi.

Translated:
Fortunately, the script is working again.

Last edited by marens (2026-12-03 00:28:55)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#82 2026-12-03 00:05:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,356

Re: Conky Weather: MyForecast Script

unklar wrote:

Yes.
That is the part of the work that forum members don't see.

For the script to remain on similar sites (Workupload, ...), it must not be inactive for more than 30 days.
As the author, I check the status of both weather forecast scripts (TAD, MF) every 25 days to ensure they remain accessible to new forum members or guests.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#83 2026-12-03 02:42:57

asqwerth
Member
Registered: 2015-10-08
Posts: 90

Re: Conky Weather: MyForecast Script

Thanks, marens.

Offline

#84 2026-12-03 13:24:41

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

Re: Conky Weather: MyForecast Script

marens wrote:

No, it isn't.  smile
Your hourly forecast should show the NEXT three hours (18h, 19h, 20h).

I know you've already warned me about this several times.  wink

In this case, it bothers me that the current hour is already shown above. Therefore, I'm deducting one or two hours from the rule.  big_smile

Offline

#85 Yesterday 04:04:50

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,356

Re: Conky Weather: MyForecast Script

Tonight I realized that I solved the problems for us from Europe who use metric values (°C, km/h, mbar, ...)
However, in the USA, they primarily use °F, mph, mi, ...

The MyForecast website (from the USA) displays this by default.
Unfortunately, if someone uses the myforecast script and wants those values, they will have to change a few lines.

The curl commands should look like this:

Daily:

curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address_daily" > $HOME/MyForecast/weather_raw

Hourly:

curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -s "$address_hourly" > $HOME/MyForecast/hourly/hourly_raw

In the  #### NOW FORECAST  section, the following lines need to be replaced (they should look like this):

## Wind Speed
cat $HOME/MyForecast/weather_raw | grep -A 2 'Wind:' | sed -e 's/ [^ ]*$//' -e 's/^[ \t]*//' -e 's/.$//' | sed -n '$p' >> $HOME/MyForecast/now

## Visibility
cat $HOME/MyForecast/weather_raw  | grep -A 2 'Visibility' | sed -e 's/^[ \t]*//' -e 's/<p class="my-2">//' -e 's/<span class=downcase>//' -e 's/<\/span><\/p>//' | sed -n '$p' >> $HOME/MyForecast/now

That is all.

The “now” file works correctly for everyone in Europe and the USA.

Europe                                    USA

now-C.png  now-F.png

Enjoy.  smile

EDIT
The commands (Wind Speed, Visibility) have been changed.

Last edited by marens (Yesterday 23:28:01)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#86 Yesterday 18:02:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,356

Re: Conky Weather: MyForecast Script

^ OK.
The commands (Wind Speed, Visibility) have been modified in the post above.

Testing shows that everything is now functioning as expected:

°F:                                            °C:
mf-F.png  mf-C.png

Perhaps it would be better for us Europeans to switch to these units, and especially to °F.
I don't like it when the temperature is below zero, and I especially don't like freezing rain.

This testing was done because the weather is currently terrible for my location.  big_smile

Last edited by marens (Yesterday 23:08:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#87 Yesterday 23:12:41

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,356

Re: Conky Weather: MyForecast Script

Equalization Commands (Units)

Sorry guys, but I’ll have to change two commands within  #### NOW FORECAST.
I adjusted the commands to be the same for metric units (Europe) as in the USA.

Find these two lines in  #### Now Forecast  and replace them (they should look like this):

## Wind Speed
cat $HOME/MyForecast/weather_raw | grep -A 2 'Wind:' | sed -e 's/ [^ ]*$//' -e 's/^[ \t]*//' -e 's/.$//' | sed -n '$p' >> $HOME/MyForecast/now
## Visibility
cat $HOME/MyForecast/weather_raw  | grep -A 2 'Visibility' | sed -e 's/^[ \t]*//' -e 's/<p class="my-2">//' -e 's/<span class=downcase>//' -e 's/<\/span><\/p>//' | sed -n '$p' >> $HOME/MyForecast/now

If you live in the USA, you will need to change the  curl  commands because you are using different units:
https://forums.bunsenlabs.org/viewtopic … 98#p154598

P.S.
The myforecast script has been updated:
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Last edited by marens (Today 00:40:21)


If people would know how little brain is ruling the world, they would die of fear.

Offline

Board footer

Powered by FluxBB