You are not logged in.

#3961 2021-02-08 15:12:28

KairiTech
Member
Registered: 2021-02-08
Posts: 7

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

Doesn't seem to work for Toronto either. Here's a snip from daily_forecast - lines 33, 34, 35, 36:

WinterCast
See detailed snow and ice outlook
Friday
2/12

And this is a snip from the Kastora daily_forecast - same lines, which seems to work fine:

-2
Mild with sunshine
0%
Saturday

Also, for Toronto the forecast_2016 directory only gets two or three of the icons but for Kastora all of the icons seem to be there.

Last edited by KairiTech (2021-02-08 15:16:09)

Offline

#3962 2021-02-08 22:45:16

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

Good call Kairitech.
The lines

WINTERCAST
See detailed snow and ice outlook

are creating the havoc, so I guess you guys have to leave your miserable, cold countries and emigrate to Greece.
Alternatively, add this line

sed -i '/WinterCast/,+1 d' $HOME/Accuweather_conky_script/daily_forecast

after line 415 of the script (just before the for loop)...


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3963 2021-02-08 23:05:15

il.harun
Member
Registered: 2020-06-04
Posts: 54

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

there is a new block in daily_forecast raw:

<div class="daily-wintercast-cta">
	<a class="daily-wintercast-cta__inner inline-cta-banner winter" href="/en/ru/moscow/294021/winter-weather-forecast/294021">
				<div class="banner-content">
					<h3 class="banner-header">
						WinterCast
					</h3>
					<p class="banner-text">
						See detailed snow and ice outlook
					</p>
				</div>
				<svg class="chevron-icon right" xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M10 .969L9.037 0 5 4.063.963 0 0 .969 5 6z" /></svg>
			</a>
</div>

I just deleted it,
script accuweather:

	#Daily forecast
	if [[ -s $HOME/Accuweather_conky_script/daily_forecast ]]; then
		sed -i '/<div class="daily-wrapper" data-qa="dailyCard0">/,/Further Ahead/!d' $HOME/Accuweather_conky_script/daily_forecast

		sed -i '/<div class="daily-wintercast-cta">/,/div class="daily-wrapper"/d' $HOME/Accuweather_conky_script/daily_forecast

		sed -i -e 's/^.*dow date">//g' -e 's/^.*sub date">//g' -e 's/^.*weathericons\///g' -e 's/\.svg.*$//g' -e 's/^.*"high">//g' -e 's/^.*"low">\///g' -e 's/&#xB0;<\/span>//g' -e 's/<\/span>//g' -e '/<\|>\|fill=\|^[ \|\t]*$\|Further Ahead/d' -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/daily_forecast

Offline

#3964 2021-02-08 23:11:52

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

Yeah, I know il.harun, thanks.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3965 2021-02-08 23:20:36

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

ANNOUNCEMENT
Moongiant script changed to comply to the page's new layout. Major cleanup of the code and conkyrc files rewritten (thanks unklar).
The downloaded info is less now; in order to obtain the previous info, the script would have to download four more pages - no way!

Last edited by TeoBigusGeekus (2021-02-09 06:21:07)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3966 2021-02-09 06:13:57

morfik
Member
From: Europe/Poland
Registered: 2016-09-08
Posts: 169
Website

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

TeoBigusGeekus wrote:

Good call Kairitech.
Alternatively, add this line

sed -i '/WinterCast/,+1 d' $HOME/Accuweather_conky_script/daily_forecast

after line 415 of the script (just before the for loop)...

It works, thanks. smile

Offline

#3967 2021-02-09 06:22:30

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

So, no emigration plans? tongue


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3968 2021-02-09 06:23:25

morfik
Member
From: Europe/Poland
Registered: 2016-09-08
Posts: 169
Website

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

Maybe to Norway. smile

Offline

#3969 2021-02-09 06:52:22

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

I'll come and visit you... In the summer..


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3970 2021-02-09 09:29:24

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

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

QIPb2j5t.png

^Teo, perfect.  smile

I would emigrate to Scotland. Unfortunately, in the meantime:
- too old  roll
- the "EU" is building more and more obstacles in its act of defiance
- I would see my grandchildren only with difficulty (Schengen is pass`e)  8o

but, it's freezing cold   big_smile

Offline

#3971 2021-02-09 13:57:44

KairiTech
Member
Registered: 2021-02-08
Posts: 7

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

TeoBigusGeekus wrote:

Good call Kairitech.
The lines

WINTERCAST
See detailed snow and ice outlook

are creating the havoc, so I guess you guys have to leave your miserable, cold countries and emigrate to Greece.
Alternatively, add this line

sed -i '/WinterCast/,+1 d' $HOME/Accuweather_conky_script/daily_forecast

after line 415 of the script (just before the for loop)...

Thanks Teo it works perfectly now and thanks for your dedication in keeping your scripts alive.

I grew up in The Caribbean but I love my snow now.  I'd honestly miss it but if I had to immigrate again Greece would at the top of the list.

Offline

#3972 2021-02-09 21:57:04

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

@unklar
We'll get a small taste of that in a few days

@kairiTech
The Caribbean? Lovely, here's some Greek reggae.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3973 2021-02-10 09:27:00

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

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

TeoBigusGeekus wrote:

@unklar
We'll get a small taste of that in a few days

Be glad that it is not (yet) as cold as it is here.
We had -16.9°C this morning and it's supposed to stay that way for another week.   big_smile

Offline

#3974 2021-02-10 23:13:12

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

ANNOUNCEMENT:
Wintercast bug corrected on Accuweather Script, thanks to all who reported it promptly.
We'll see if we'll have to deal with a Spring/Summer/Autumncast in the future...

Last edited by TeoBigusGeekus (2021-02-19 08:12:20)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3975 2021-02-10 23:15:18

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

unklar wrote:

Be glad that it is not (yet) as cold as it is here.
We had -16.9°C this morning and it's supposed to stay that way for another week.   big_smile

That calls for some scotch and a fireplace.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3976 2021-02-11 09:20:41

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

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

^Scotch is not a problem...  ]:D

Thank you for your work.
Can you please say something about it? big_smile

Last edited by unklar (2021-02-11 09:25:32)

Offline

#3977 2021-02-21 00:40:04

KairiTech
Member
Registered: 2021-02-08
Posts: 7

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

TeoBigusGeekus wrote:

Good call Kairitech.
The lines

WINTERCAST
See detailed snow and ice outlook

are creating the havoc, so I guess you guys have to leave your miserable, cold countries and emigrate to Greece.
Alternatively, add this line

sed -i '/WinterCast/,+1 d' $HOME/Accuweather_conky_script/daily_forecast

after line 415 of the script (just before the for loop)...

Thanks again Teo.  You seem very adept at sed and there's one thing I have never been able to figure out.

How do you use sed to replace a single line with multiple lines?  Is that even possible with sed?

Offline

#3978 2021-02-21 06:04:35

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

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

KairiTech wrote:

How do you use sed to replace a single line with multiple lines?  Is that even possible with sed?

Yes, totally.
The first result from this search:

sed -i.bak $'s/You are good/You are bad\\\nYou are the worst/g' /output.txt

Offline

#3979 2021-02-21 13:16:56

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

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

Accuweather script is not pulling daily forecast or images, only current conditions. When I run the script:

MainFrame Accuweather_conky_script $ ./accuweather -f2016
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
rm: cannot remove '/home/thomas/Accuweather_conky_script/forecast_2016/forecast_*.png': No such file or directory

Offline

#3980 2021-02-21 22:05:37

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

All's well here with Accuweather.
Could you please give me your location seatommyboy?

@KairiTech
Thanks for your kind words.
To replace a whole line you can either do what ohnonot wrote or use the c command
File test:

Once upon a
hasta la vista baby
while I pondered 
weak and weary
sed -i '/hasta/cmidnight dreary' ./test

It will replace the whole 2nd line with 'midnight dreary'.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

Board footer

Powered by FluxBB