You are not logged in.

#141 2025-11-29 17:31:37

Döbbie03
Resident Metalhead
From: New Zealand
Registered: 2015-09-29
Posts: 3,947

Re: Conky TAD script

marens wrote:

My code was immediately found in your script:

Get over it and move on. If it's such a big deal, don't share "your" code on a public forum.


"All we are is dust in the wind, dude"
                                       - Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
                                       - Wayne Campbell

Offline

#142 2025-11-29 19:10:20

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

Re: Conky TAD script

Döbbie03 wrote:

Get over it and move on. If it's such a big deal, don't share "your" code on a public forum.

Of course that's not a problem.
This is the reason:

I don't understand it because your name doesn't appear anywhere. It's @TBG's script, which some people, including me, have mangled, bent and straightened.

I came here to try to save all of @TBG's scripts and have been doing so successfully for several years.
I even improved some of them.

Then someone says my name doesn't appear anywhere.
Everyone here knows what the truth is.

@Döbbie03, you're not expected to be informed because you don't come here.

Last edited by marens (2025-11-29 19:14:00)


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

Offline

#143 2025-11-29 19:19:33

Döbbie03
Resident Metalhead
From: New Zealand
Registered: 2015-09-29
Posts: 3,947

Re: Conky TAD script

marens wrote:

@Döbbie03, you are not expected to be informed because you do not come here.

I am informed, and as a moderator I will comment and act where necessary.


"All we are is dust in the wind, dude"
                                       - Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
                                       - Wayne Campbell

Offline

#144 2025-11-29 22:58:20

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

Re: Conky TAD script

@asqwerth

marens wrote:

I think I managed to improve the ## Daily Date + Phrase - Next 7 Days  section.
Instead of seven cat commands, just one is enough.

https://forums.bunsenlabs.org/viewtopic … 40#p147340

Sorry, I was wrong.
Actually, I meant ## Daily Forecast Images - Next 7 Days.

I accidentally removed the contents of the ## Daily date + phrase - Next 7 days  section.
This is what it should look like in the TAD script (both sections):

## Daily Date + Phrase - Next 7 Days

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $2}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' > $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $3}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $4}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $5}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $6}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $7}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

cat $HOME/time_and_date_conky_script/weather_raw | grep 'View historic weather' | awk -F'ext&#39;)"><div class=wt-dn>' '{print $8}' | awk -F'"' '{print $1, $2}' | sed 's/<\/div><img class=mtt title=/ /' >> $HOME/time_and_date_conky_script/date_and_phrase

## Daily Forecast Images - Next 7 Days

cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]src="//c.tadst.com/gfx/w/svg[^ ]*' | sed -n '19,25p' | sed 's/ src="/https:/' | sed 's/.$//' | awk -F'svg/' '{print $2}' | sed 's/svg/png/' > $HOME/time_and_date_conky_script/images

  j=1
                       
    for (( i=1; i<=7; i+=1 ))
			
      do
		    	
        cp $HOME/time_and_date_conky_script/tad-icons/$(sed -n ${i}p $HOME/time_and_date_conky_script/images) $HOME/time_and_date_conky_script/day_$j.png
    
  ((j++))
  
  done

I hope you didn't have a problem.
I told you to make a copy first, but... 

Another proof why backup is important.  smile

I'm liking the WU icons more and more.
Tonight I saw the Sun for the first time in tad-conky.  big_smile

tad-conky.png    date-and-phrase.png    date.png

It's still Saturday here, but you can see that the website has switched to tomorrow's forecast:

forecast.png

Last edited by marens (2025-11-30 02:32:00)


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

Offline

#145 2025-11-30 05:14:20

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

Re: Conky TAD script

@marens,

I believe that, at least for my location, there may be a limit on how many calls are made to the website as my date_and_phrase file is generated as an empty file again (I accessed it a lot yesterday as I was tweaking another conky).  This is using your original script, without your recent changes.

Due to the non-reliability of dateandphrase for me, I will stick to the "| cut...." command when I want to split the text over 2 or more lines.  That's because those "cut" lines take up as many lines as I expect, in the formatting of the conky and positioning of the icon images. 

Your code is too clever and takes up only 1 line, so when the dateandphrase file is empty, there are fewer lines in the conky and the text after that point is moved up.  That leaves the icon images in the wrong position.  With "cut", the conky lines are still there even if they don't generate any text.

[ADDED - the "fmt" command will also preserve the number of lines I want]

Thus:

FtJUL6k.png

Last edited by asqwerth (2025-11-30 06:20:28)

Offline

#146 2025-11-30 14:15:20

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

Re: Conky TAD script

^ I don't know anything about a limited number of calls and can't confirm, but it's possible.
The weather forecast on the website is updated for my location every three hours.
That's why in tad-conky I use:

${texeci 1800 bash $HOME/time_and_date_conky_script/tad}

When setting up tad-conky, temporarily remove the line above so that you don't make additional calls.

You are right about the "High and Low" section.
I reverted to the fmt command with the intended 3 lines.
Maybe the third row isn't necessary, but I don't know without testing.

Day_1:

${goto 100}${color ff8080}High and Low:${color}  ${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '1p'}
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '2p'}
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '3p'}

For the NOW section it is necessary to modify the commands:

$ echo 'Sprinkles early. Overcast' | fmt -w 25 | sed -n '1p'
Sprinkles

$ echo 'Sprinkles early. Overcast' | fmt -w 25 | sed -n '2p'
early. Overcast

Conky:

${execpi 90 sed -n '4p' $HOME/time_and_date_conky_script/now | fmt -w 25 | sed -n '1p'}
${execpi 90 sed -n '4p' $HOME/time_and_date_conky_script/now | fmt -w 25 | sed -n '2p'}

I use only one line with ${alignc}.

tad-wu.png


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

Offline

#147 2025-11-30 15:42:15

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,075

Re: Conky TAD script

asqwerth wrote:

I believe that, at least for my location, there may be a limit on how many calls are made to the website as my date_and_phrase file is generated as an empty file again ... [snip]

Yeah, I've reached data collection limits as well.  And restarting weather conkys a lot while editing them reaches that limit pretty quick.  Here's what I do:

1. run the weather conky once just before editing,
2. comment (#) the data collecting line,
3. edit the conky using existing data,
4. when done remove the # from the data collecting line,
5. run the conky once to see if there are any new updates.
6. check for "OOPS!" and if found start at #2 again, else
7 you're good to go!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#148 2025-12-01 00:54:50

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

Re: Conky TAD script

asqwerth wrote:

I believe that, at least for my location, there may be a limit on how many calls are made to the website as my date_and_phrase file is generated as an empty file again (I accessed it a lot yesterday as I was tweaking another conky).

No.
The same thing happened to me tonight.

I think the reason has been found - MONDAY.
On Mondays, there is no "View historical weather" section in the table (Forecast for next 2 weeks).

I added the ## Daily Forecast Phrase - Next 7 Days  section to the TAD script before ## Temperatures - Next 7 days.
It looks like this:

## Daily Forecast Phrase - Next 7 Days

cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]class=mtt title="[^"]*' | sed -n '18,24p' | sed 's/ class=mtt title="//' > $HOME/time_and_date_conky_script/phrase
  
## Temperatures - Next 7 days

A separate phrase section works as expected.
Open the file ~/time_and_date_conky_script/phrase  and check:

Increasing cloudiness.
Overcast.
Decreasing cloudiness.
Overcast.
Overcast.
Sprinkles early. Overcast.
Mostly cloudy.

Testing continues.
If everything goes well, we can remove the entire ## Daily date + phrase - Next 7 days  section from the TAD script.

P.S.
If you have time, test it because your time zone is 6 hours ahead of mine.


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

Offline

#149 2025-12-01 06:48:22

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

Re: Conky TAD script

Sector11 wrote:

Yeah, I've reached data collection limits as well.  And restarting weather conkys a lot while editing them reaches that limit pretty quick.  Here's what I do:

1. run the weather conky once just before editing,
2. comment (#) the data collecting line,
3. edit the conky using existing data,
4. when done remove the # from the data collecting line,
5. run the conky once to see if there are any new updates.
6. check for "OOPS!" and if found start at #2 again, else
7 you're good to go!

Thanks.  I think this is a good practice, whether or not data limits are the reason for the missing dataandphrase file with regard to the tad script. 

IIRC, I have experienced data limits with wttr.in before, even when I wasn't editing a conky; just logging into my desktop. [added: when conkies get autostarted]

========================================================


@marens, the dateandphrase (dnp) file is back, and I have changed all the text condition lines to use the FMT commands. 


Regardless, I'll test the latest changes to the tad script.  I'll edit a conky to read this new 'phrase' file and see how it goes.

[EDITED/UPDATE]  For now the new script is doing its work, but let's see how it holds up - under heavy use or during the website's regular Monday data changeover.

This was the conky I was working on yesterday which led to me running the tad script so often - an extended version of my simple tad conky.  I've changed it to read weather forecasts from the "phrase" file.

YpsgzO4.png

Last edited by asqwerth (2025-12-01 08:18:20)

Offline

#150 2025-12-01 11:11:53

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

Re: Conky TAD script

marens wrote:

...

You are right about the "High and Low" section.
I reverted to the fmt command with the intended 3 lines.
Maybe the third row isn't necessary, but I don't know without testing.

Day_1:

${goto 100}${color ff8080}High and Low:${color}  ${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '1p'}
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '2p'}
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '3p'}

For the NOW section it is necessary to modify the commands:

$ echo 'Sprinkles early. Overcast' | fmt -w 25 | sed -n '1p'
Sprinkles

$ echo 'Sprinkles early. Overcast' | fmt -w 25 | sed -n '2p'
early. Overcast

Conky:

${execpi 90 sed -n '4p' $HOME/time_and_date_conky_script/now | fmt -w 25 | sed -n '1p'}
${execpi 90 sed -n '4p' $HOME/time_and_date_conky_script/now | fmt -w 25 | sed -n '2p'}

...

@marens,

I only just noticed that for the daily forecasts (using the "phrase" file), I have to use the same style of fmt commands as the current weather ("now") otherwise the first word does not show up.

See my screenshot above where day 1 and 2's first word displayed is not capitalised.  That's because the actual first word was cut off.

So now my day 1 (and day 2, day 3) commands are:

${goto 75}${color6}${execpi 600 sed -n '1p' $HOME/time_and_date_conky_script/phrase | fmt -w 26 | sed -n '1p'}
${goto 75}${color6}${execpi 600 sed -n '1p' $HOME/time_and_date_conky_script/phrase | fmt -w 26 | sed -n '2p'}

I can't use the

 | sed 's/[^ ]* *//' | fmt -w 25 | sed -n '1p'}

filter.

Last edited by asqwerth (2025-12-01 11:12:54)

Offline

#151 2025-12-01 11:32:00

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

Re: Conky TAD script

^ Hourly forecast?  smile

I changed the "High and Low" part for Day_1 and Day_2.
Three lines are planned.
If the output is one or two lines, it should not break spaces in conky.

Day_1 (High and Low):

${goto 100}${color ff8080}High and Low:${color}  ${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}

Day_2 (High and Low):

${goto 100}${color ff8080}High and Low:${color}  ${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/date_and_phrase | sed 's/[^ ]* *//' | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${execpi 90 sed -n '2p' $HOME/time_and_date_conky_script/date_and_phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}

For moon, look here:
https://forums.bunsenlabs.org/viewtopic … 46#p128546


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

Offline

#152 2025-12-01 11:55:03

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

Re: Conky TAD script

I don't intend to have a 3rd line in my daily forecast text. 

I'm just pointing out my experience, which is that the fmt command for the daily forecast text that you posted in

https://forums.bunsenlabs.org/viewtopic … 09#p147409

just above, will cut off the first word of that day's forecast.

Offline

#153 2025-12-01 13:48:20

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

Re: Conky TAD script

^ Those commands are for the file "date_and_phrase".
Just remove from each line sed 's/[^ ]* *//' .

If you are testing a new "phrase" file and you want your output to look like this (two lines):

Passing clouds.
Light Rain.

Day_1:

${goto 100}${color ff8080}High and Low:${color}  ${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${execpi 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}

Repeat similarly (sed -n '2p') for Day_2.

If you want the same in the NOW section, first replace the fourth  cat  command in the TAD script (#### NOW):

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

with:

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

EDIT
Looks like I skipped this post:
https://forums.bunsenlabs.org/viewtopic … 28#p147428

It appeared while I was writing mine.
After that I was busy and I was not at home.

You've already done everything necessary (fmt command).

Meanwhile, night has arrived here too and the new "phrase" file is working great.
The number of calls is not limited, only a different approach was needed.
Let's wait for next MONDAY and then we can say that the testing was successful.
The "date_and_phrase" part will be removed from the script.

Thank you for catching that.

Last edited by marens (2025-12-01 23:36:20)


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

Offline

#154 2025-12-02 09:50:24

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

Re: Conky TAD script

@marens

The "date" file has not updated itself since yesterday (Monday 1 Dec) even though the other files have done so.

Therefore, although all the weather data and conditions are for Tues 2 Dec, the '1p' date shown on my conky is still Mon, 1 Dec.

Offline

#155 2025-12-02 14:10:40

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

Re: Conky TAD script

^ I can't confirm.
Everything is fine here (for now):

tad.png

Check when the "date-raw" file is updated.
Then check in the terminal (the first day):

$ cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $1}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//'

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

Offline

#156 2025-12-02 16:16:21

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

Re: Conky TAD script

Never mind.  User error.  I must have accidentally deleted the "date" portion of the script when I added your "phrase" section.

I have restored the missing section and everything is ok again.

Offline

#157 2025-12-03 01:48:40

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

Re: Conky TAD script

asqwerth wrote:

Never mind.  User error.  I must have accidentally deleted the "date" portion of the script when I added your "phrase" section.

I have restored the missing section and everything is ok again.

Don't worry.
It happens to everyone.  big_smile

Last edited by marens (2025-12-03 01:58:50)


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

Offline

#158 2025-12-03 01:52:50

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

Re: Conky TAD script

@asqwerth

These commands work great for me and everything is always perfectly aligned with no changes in spacing:
https://forums.bunsenlabs.org/viewtopic … 31#p147431

For my location, one or two lines usually appear, but I left the option for three because the weather icons are large enough.

Once you set the spacing, that's it:

daily.png

Last edited by marens (2025-12-03 02:00:40)


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

Offline

#159 2025-12-05 12:49:52

seatommyboy
Member
Registered: 2016-09-12
Posts: 66

Re: Conky TAD script

Looks like there is a whole new set of scripts for conky weather. anybody care to share a link please?

Offline

#160 2025-12-07 00:10:40

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

Re: Conky TAD script

While I wait to see if the "MONDAY" bug is resolved, I've made a few improvements.

Note *
Please make a copy first

The ## Daily Day + Date - Next 7 Days  part now has only two lines.
Replace:

## Daily 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-raw

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $1}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' > $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $2}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $3}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $4}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $5}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $6}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

cat $HOME/time_and_date_conky_script/date-raw | grep '"ds"' | awk -F'","icon"' '{print $7}' | awk -F'"ds":"' '{print $2}' | sed 's/\.//' >> $HOME/time_and_date_conky_script/date

With:

## 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-raw

cat $HOME/time_and_date_conky_script/date-raw | grep -o '[,^]"ds":"[^"]*' | sed 's/,"ds":"//g' | sed 's/\.//g' | sed -n '1,7p' > $HOME/time_and_date_conky_script/date

A similar thing was done in the #### HOURLY  section.

Part  #### HOURLY  >  ## Temperature  now looks like this (just one line):

## Temperature
cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]class="h2 soft" [^ ]*' | sed -e 's/<\/td><td>/\n/g' | sed '1,1d' | sed 's/ class="h2 soft" ><td>//' | sed 's/&nbsp;/ /' | sed 's/<\/td><\/tr><\/tbody><\/table><\/div><p//' > $HOME/time_and_date_conky_script/hourly/temperature

Part  #### HOURLY  >  ## Hourly Time  now looks like this (just one line):

## Hourly Time
cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]class=h2 ><td>Now</td><td>[^ ]*' | sed -e 's/<\/td><td>/\n/g' | sed '1,1d' | sed 's/<\/td><\/tr><tr//' > $HOME/time_and_date_conky_script/hourly/time

@asqwerth

Although it seemed unusual to me that conky would switch to TOMORROW'S forecast in the early evening hours, I now think it's a good thing.
I'm less interested in the weather forecast until midnight.

Your idea of adding a 3-hour weather forecast is acceptable and useful.
Here's a screenshot from earlier tonight:

tad-conky.png

P.S.
Considering your time zone, you will be the first to know if the "MONDAY" bug has been resolved.


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

Offline

Board footer

Powered by FluxBB