You are not logged in.

#221 2025-12-31 19:58:40

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

Re: Conky Weather TAD script

Before I start drinking (beer), tad-font-conky  finished:

${voffset 10}\
${goto 8}${color 48bcff}WEATHER${color}\
${texeci 1800 bash $HOME/time_and_date_conky_script/tad}
${goto 120}${voffset 10}Currently:
${goto 20}${font conkyweather:size=60}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/now}${font}${color fedf08}${voffset -35}${font :size=18}${goto 120}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/now | awk '{print $2}'}° ${color 48bcff}(${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/now | awk '{print $3}'}°)${font}${color}${voffset -20}${color}

${voffset 30}${alignc}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/now}

${goto 32}${color 48bcff}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 122}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 212}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/time}${color}
${voffset 5}${goto 20}${font conkyweather:size=30} ${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/hourly}${goto 110} ${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/weatherfont/hourly}${goto 200} ${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/weatherfont/hourly}${font}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 35}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 32}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 125}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 122}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 215}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 212}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}

${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${goto 15}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date}${color}
${voffset 5}${goto 20}${font conkyweather:size=50}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/daily}${font}${goto 100}${voffset -45}${color ff8080}High and Low:${color}  ${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\

${voffset -20}${goto 15}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date}${color}
${voffset 5}${goto 20}${font conkyweather:size=50}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/weatherfont/daily}${font}${goto 100}${voffset -45}${color ff8080}High and Low:${color}  ${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}

EDIT
Slightly changed.

Note *
The minimum_size  is 270 455

Conkys:
tad-font.png  test-conky.png

Folders and images:
daily.png  hourly.png

Happy New Year everyone!
happy-new-year-2026.gif

Last edited by marens (2026-01-01 19:30:20)


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

Offline

#222 2026-01-06 14:35:20

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

Re: Conky Weather TAD script

Flood Icon

marens wrote:

A couple of small changes.
For example, the wt-32.png icon is a flood.
Replaced with N/A.

This is the original wt-32.png  tad-icon indicating a flood:

wt-32.png

The test_image  function can be adjusted to produce a similar icon.
This is of course a simulation * :

flood.png

Replace:

         32)
           echo -
         ;;

With:

         32)
           echo 9
         ;;

The devil always hides in the details.
Maybe it's better not to wake him?

The TAD script has been updated:
https://forums.bunsenlabs.org/viewtopic … 76#p147776

Note *
I don't know what this "symbol" represents in the ConkyWeather font and I hope you never see it in your weather forecast.

This is probably the only weather forecast that has a flood icon and I think the suggested symbol is appropriate as it is not used anywhere else in the TAD script.

Last edited by marens (2026-01-06 15:34:20)


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

Offline

#223 2026-01-06 15:10:54

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

Re: Conky Weather TAD script

marens wrote:

Note *
I don't know what this "symbol" represents in the ConkyWeather font and I hope you never see it in your weather forecast.

Fog
second attempt
https://forums.bunsenlabs.org/viewtopic … 80#p148080

Offline

#224 Yesterday 09:41:33

alexban21
New Member
Registered: Yesterday
Posts: 1

Re: Conky Weather TAD script

Thanks for posting this and for the heads-up about Accuweather_RSS being down for the moment.

I gave the TAD script a quick read and it’s a solid stopgap. A couple of notes that might save people some head-scratching:

Make it executable after you create it:

chmod +x ~/time_and_date_conky_script/tad


Then you can run it as ~/time_and_date_conky_script/tad instead of bash ….

Dependencies: this will need curl, grep, awk, sed (usually present) and also ImageMagick for convert:

sudo apt install imagemagick


(Otherwise it’ll fail at the icon step.)

The parsing is pretty brittle (lots of grep ... | awk -F ...) so if timeanddate tweaks their HTML even slightly, some lines may come out blank. If anyone hits that, the first thing to check is ~/time_and_date_conky_script/weather_raw to see what changed.

Minor cleanup: you don’t need cat file | grep ... — grep ... file is enough — but that’s just style, not required.

I updated the address= line to my location and after one manual run, ~/time_and_date_conky_script/now had the expected fields (temp / feels like / forecast / etc.), so it looks like it should work fine as a Conky text source until Accuweather is back.

If you want, I can also post a simple Conky snippet that reads now and displays the 0.png icon cleanly.

Offline

#225 Yesterday 13:50:20

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

Re: Conky Weather TAD script

^ First of all, welcome to the BL forums @alexban21.

Thanks for testing the TAD script.

alexban21 wrote:

Make it executable after you create it:

chmod +x ~/time_and_date_conky_script/tad

Then you can run it as ~/time_and_date_conky_script/tad instead of bash ….

Dependencies: this will need curl, grep, awk, sed (usually present) and also ImageMagick for convert:

sudo apt install imagemagick

1) When you download the script, it is already made executable.
2) @TBG always use bash to run weather scripts in conkys.
3) Our forum members using @TBG's accuweather scripts have all dependencies installed.

Yes.
Parsing is quite complicated.
The website uses many local variations (units, time format...) and it was difficult to create a script that works for all locations.

alexban21 wrote:

If you want, I can also post a simple Conky snippet that reads now and displays the 0.png icon cleanly.

It is common on this forum for members to make suggestions or post their solutions.

Anyway, thanks for the feedback.

EDIT

alexban21 wrote:

I updated the address= line to my location and after one manual run, ~/time_and_date_conky_script/now had the expected fields (temp / feels like / forecast / etc.), so it looks like it should work fine as a Conky text source until Accuweather is back.

I'm not sure which version of the TAD script you tested.

Meanwhile, hourly and daily forecasts have been added, as well as the ability to use weather/wind fonts.
Here is the latest version:
https://forums.bunsenlabs.org/viewtopic … 76#p147776

The TAD script is now complete.
I could easily extend the daily forecast to 15 days (instead of 7), but I don't think that's necessary.

Last edited by marens (Today 18:54:40)


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

Offline

Board footer

Powered by FluxBB