You are not logged in.

#41 2026-05-01 15:04:39

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

Re: MyForecast Script

asqwerth wrote:

It's not great where I live as I get lots of thunderstorms, and the icons for that weather condition have black coloured clouds.  The black doesn't stand out against the desktop background.

I did a simulation and can confirm:
black.png

If I use the icons above it looks fine:
https://forums.bunsenlabs.org/viewtopic … 98#p150498

gray.png

Last edited by marens (2026-05-01 18:54:28)


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

Offline

#42 2026-05-02 03:42:39

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

Re: MyForecast Script

@marens

Thanks for the recoloured icons.  The icon set works great now.

Offline

#43 2026-05-06 17:40:20

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

Re: MyForecast Script

Info

The MyForecast script with all changes/improvements is at the end of this post:
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Last edited by marens (2026-05-07 23:50:40)


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

Offline

#44 2026-05-10 01:05:40

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

Re: MyForecast Script

Please, be sure to read this:
https://forums.bunsenlabs.org/viewtopic … 39#p150739

Thanks!


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

Offline

#45 2026-05-14 13:55:20

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

Re: MyForecast Script

Last night the MyForecast website was down for about an hour:

myforecast1.png  myforecast2.png

All files needed by mf-conky were empty.

If necessary, you can always check here:
https://onlineornot.com/website-down-checker

P.S.
If this happens more often, I can easily prevent the myforecast script from generating empty files as done here:
https://forums.bunsenlabs.org/viewtopic … 02#p150702


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

Offline

#46 Today 01:18:40

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

Re: MyForecast Script

^ OK.
If you want, you can test together with me.

This is what the beginning of the myforecast script where the  curl  commands are located should look like:

---

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

    check1=$(cat $HOME/MyForecast/weather_raw)   

sleep 1.4

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

    check2=$(cat $HOME/MyForecast/hourly/hourly_raw)

    if [[ $check1 =~ "Internal Server Error" || $check2 =~ "Internal Server Error" ]]; then
      
      echo '* Server Error' > $HOME/MyForecast/server_error
  
       exit 0
       
    fi
    

#### NOW FORECAST

> $HOME/MyForecast/server_error

---

Then open the  ~/MyForecast   folder and create a  server_error  file inside.
The myforecast script will generate a  "* Server Error"  line in the server_error file if the website is offline.

Done.

Now it needs to be displayed in mf-conky (if it happens).
It was easy for me because I have the word Weather in the title.

${voffset 8}${goto 10}${color 48bcff}WEATHER${color}\
${font :size=9}${color ff8080}${goto 120}${texeci 90 sed -n '1p' $HOME/MyForecast/server_error}${color}${font}\
${texeci 1800 bash $HOME/MyForecast/myforecast}   ...

mf-conky.png

The screenshot above is of course a simulation.
I opened the file  ~/MyForecast/server_error  using a text editor and entered the line:  * Server Error.

After that I just waited for the warning to appear in mf-conky.
The warning disappeared the next time mf-conky ran the myforecast script.  smile


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

Offline

Board footer

Powered by FluxBB