You are not logged in.

#3451 2020-05-24 09:10:27

ohnonot
...again
Registered: 2015-09-29
Posts: 4,753
Website

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

TeoBigusGeekus wrote:

You must have created/pulled a branch sometime in the past.

git status

is always helpful in situations like these.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#3452 2020-05-24 09:18:27

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

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

I also can confirm that it works well now. smile

Offline

#3453 2020-05-24 21:32:21

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

ANNOUNCEMENT

Accuweather added a few more lines to their hourly weather forecast (indoor humidity) for every hour. They totally screwed all existing hourly conky configurations, so I removed them. Thanks to morfik and unklar for their quick notifications.


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

#3454 2020-05-28 08:34:31

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

Weather.com

There are new mistakes.  sad  monkey

Tested with siduction (installed packages: fig2dev; libnetpbm10; netpbm; libwmf-bin; librsvg2-bin)

convert-im6.q16: delegate failed `'rsvg-convert' -o '%o' '%i'' @ error/delegate.c/InvokeDelegate/1928.
convert-im6.q16: unable to open file `/tmp/magick-280475Wo_bPpGcyIdo': Datei oder Verzeichnis nicht gefunden @ error/constitute.c/ReadImage/599.
convert-im6.q16: no images defined `/home/unklarer/Weather_com_conky_script/Forecast_Images/d9.png' @ error/convert.c/ConvertImageCommand/3258.
Error reading SVG:XML parse error: Error domain 1 code 5 on line 1 column 256 of data: Extra content at the end of the document

with archlinux (imagemagick 7.0.10.14-1)

(process:4495): librsvg-CRITICAL **: 09:42:31.321: Handle could not read or parse the SVG; did you check for errors during the loading stage?
convert: negative or zero image size `/home/unklar/Weather_com_conky_script/Forecast_Images/now.svg' @ error/image.c/SetImageExtent/2640.
convert: no decode delegate for this image format `/home/unklar/Weather_com_conky_script/Forecast_Images/now.svg' @ error/svg.c/ReadSVGImage/3423.
convert: no images defined `/home/unklar/Weather_com_conky_script/Forecast_Images/now.png' @ error/convert.c/ConvertImageCommand/3282.

with bunsenlabs (inkscape 0.92.4-3)

convert-im6.q16: Extra content at the end of the document
 `Datei oder Verzeichnis nicht gefunden` @ error/svg.c/SVGError/2995.
convert-im6.q16: no images defined `/home/unklar/Weather_com_conky_script/Forecast_Images/d10.png' @ error/convert.c/ConvertImageCommand/3258.

Although the messages are different, the effect is the same as leaving the files
10days;
hourly
and now empty.

But, this is not continuous. In between everything is fine again.

I suspect that the quality of the delivered svg files from Weather.com is poor.

Teo, when you have time, can you check this ?  smile

Offline

#3455 2020-05-28 16:17:12

ector1935
Member
Registered: 2017-05-03
Posts: 209

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

Hi.
maybe it can be of help to those who use sid, we should find the identical dependencies of arch for sid, I don't use inkscape.
Cheers
edit
have you installed this package?!
librsvg2-2

archlabs% pacman -Qi imagemagick 
Nome                      : imagemagick
Versione                  : 7.0.10.14-1
Descrizione               : An image viewing/manipulation program
Architettura              : x86_64
URL                       : https://www.imagemagick.org/
Licenze                   : custom
Gruppi                    : Nessuno
Fornisce                  : libmagick
Dipenda da                : libltdl  lcms2  fontconfig  libxext  liblqr
                            libraqm  libpng  libxml2
Dipendenze opzionali      : ghostscript: PS/PDF support
                            libheif: HEIF support [installato]
                            libraw: DNG support [installato]
                            librsvg: SVG support [installato]
                            libwebp: WEBP support [installato]
                            libwmf: WMF support [installato]
                            libxml2: Magick Scripting Language [installato]
                            ocl-icd: OpenCL support
                            openexr: OpenEXR support [installato]
                            openjpeg2: JPEG2000 support [installato]
                            pango: Text rendering [installato]
                            imagemagick-doc: manual and API docs
Richiesto da              : archlabs-i3lock-fancy  transcode  zbar
Opzionale per             : feh
Conflitti con             : imagemagick6
Sostituisce               : imagemagick6  libmagick
Spazio richiesto          : 9,70 MiB
Pacchettizzatore          : Antonio Rojas <arojas@archlinux.org>
Data di creazione         : sab 23 mag 2020, 21:44:24
Data di installazione     : lun 25 mag 2020, 10:34:07
Motivo dell'installazione : Installato come dipendenza di un altro pacchetto
Script di install         : No
Convalidato da            : Firma

archlabs% pacman -Qi inkscape
errore: impossibile trovare il pacchetto 'inkscape'
archlabs% 

Last edited by ector1935 (2020-05-28 16:21:08)

Offline

#3456 2020-05-28 20:52:53

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

I get the same thing in Arch.
...but... from the little I've tried, I don't get error messages when I run the script by itself.
If I run the script via conky, I get the same error as unklar

(process:28559): librsvg-CRITICAL **: 23:50:00.948: Handle could not read or parse the SVG; did you check for errors during the loading stage?
convert: negative or zero image size `/home/teo/Weather_com_conky_script/Forecast_Images/d15.svg' @ error/image.c/SetImageExtent/2640.
convert: no decode delegate for this image format `/home/teo/Weather_com_conky_script/Forecast_Images/d15.svg' @ error/svg.c/ReadSVGImage/3423.
convert: no images defined `/home/teo/Weather_com_conky_script/Forecast_Images/d15.png' @ error/convert.c/ConvertImageCommand/3282.

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

#3457 2020-05-29 06:23:25

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

^interesting, I'll have to test that...   wink

Offline

#3458 2020-05-29 08:54:36

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

[unklar@archhost Weather_com_conky_script]$ ./weather_com

(process:3526): librsvg-CRITICAL **: 10:51:38.311: Handle could not read or parse the SVG; did you check for errors during the loading stage?

(process:3526): librsvg-CRITICAL **: 10:51:38.311: Handle could not read or parse the SVG; did you check for errors during the loading stage?
convert: negative or zero image size `/home/unklar/Weather_com_conky_script/Forecast_Images/now.svg' @ error/image.c/SetImageExtent/2640.
convert: no decode delegate for this image format `/home/unklar/Weather_com_conky_script/Forecast_Images/now.svg' @ error/svg.c/ReadSVGImage/3423.
convert: no images defined `/home/unklar/Weather_com_conky_script/Forecast_Images/now.png' @ error/convert.c/ConvertImageCommand/3282.

There's no difference with me. The mistake remains.   hmm

Offline

#3459 2020-05-29 22:18:41

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

You're absolutely right, here as well...
It's also strange that the files are arbitrarily populated after multiple reruns of the script.
Sometimes all 3 will have content, sometimes only 1, or 2, sometimes all of them will be empty.
What's also strange is that despite all the error messages I get all the weather images in the Forecast_Images folder.


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

#3460 2020-05-30 06:53:05

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

Exactly, Teo, I made the same observation.  monkey

Offline

#3461 2020-05-30 17:24:42

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,218

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

It's playing games with us.  Sometimes the conky is full, other time not!
Busy with little time to test ... but I will.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3462 2020-05-30 22:28:48

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

AFAICT, there's nothing wrong with the script, as it pulls data, though inconsistently.
I tried a bit to test the code line by line, but it seems that it should work, all the time.
It just doesn't... hmm

Last edited by TeoBigusGeekus (2020-05-30 22:29:04)


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

#3463 2020-05-31 13:15:18

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,218

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

Hmmm ... hi-tech voodoo ?


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3464 2020-05-31 21:19:35

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

More like weather.com's got the coronavirus or something...


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

#3465 2020-05-31 22:12:27

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

Right...
I think weather.com's started some accuweather.com's tricks.
Replacing wget with curl seems to solve the problem.
Beta testers are always welcome.

#!/usr/bin/env bash


#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -b"


#########################################################################################################
# Put your language's interpretation of today, tenday and hourly - as shown in weather.com's url - here #
# Example for German:														   	   					    #
#     today=heute																						#
#     tenday=10tage																						#
#     hourly=stundlich                                                                                  #	
# Example for French:																					#
#     today=aujour																						#
#     tenday=10jours																					#
#     hourly=parheure																					#
# etc., you get the idea																				#
#########################################################################################################
today=today
tenday=tenday
hourly=hourbyhour


###############################################################################################################################
# Put your Weather.com address here, add en-GB between weather.com and weather for metric. You can use any language you want. #
###############################################################################################################################
#address="https://weather.com/weather/today/l/USHI0026:1:US"
address="https://weather.com/en-GB/weather/today/l/44114afd18d51b90206ceecf0e548aa87fe4ccfa9e6e746022ac3bd079d429c5"
#address="https://weather.com/en-GB/weather/today/l/ARBA0009:1:AR"
#address="https://weather.com/de-LI/wetter/heute/l/6f62e1be6a5f0d36914ae9eab7c3aedbbec5b5c6e0946c3fe6069a94435fc196"
#address="https://weather.com/el-GR/weather/today/l/44114afd18d51b90206ceecf0e548aa87fe4ccfa9e6e746022ac3bd079d429c5"
#address="https://weather.com/de-DE/wetter/heute/l/44114afd18d51b90206ceecf0e548aa87fe4ccfa9e6e746022ac3bd079d429c5"
#address="https://weather.com/fr-FR/temps/aujour/l/0121bf9710ae35daa414ce903453d12358ddc10bee696b17d1f973fafc5260c4"


##########################
# Function: colorize_svg #
##########################
colorize_svg () {
    sed -i -e 's/var(--color-cloud)/#fff/g' -e 's/var(--color-star)/#fff/g' -e 's/var(--color-wind)/#fff/g' -e 's/var(--color-fog)/#fff/g' -e 's/var(--color-moon)/#e6e6e6/g' -e 's/var(--color-lightning)/#f2df00/g' -e 's/var(--color-drop)/#6ec4e9/g' -e 's/var(--color-sun)/#f9ed32/g' -e 's/var(--color-snowflake)/#fff/g' -e 's/var(--color-hail)/#fff/g' -e 's/var(--color-sun-center)/#f9ed32/g' -e 's/var(--color-sun-ray)/#f9ed32/g' $1
}


#######################
# Pause weather conky #
#######################
pkill -STOP -xf "$weather_conky_launch_command"


#######
# Now #
#######
curl \
  -H 'authority: weather.com' \
  -H 'cache-control: max-age=0' \
  -H 'upgrade-insecure-requests: 1' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Safari/537.36' \
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'sec-fetch-site: none' \
  -H 'sec-fetch-mode: navigate' \
  -H 'sec-fetch-user: ?1' \
  -H 'sec-fetch-dest: document' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cookie: logatimLevel=INFO; akacd_NxtGen-DHLS=2177452799~rv=98~id=614d27d4c75f75df7bad5550f54e64b1; speedpin=4G; ci=TWC-Locale-Group=US&X-Origin-Hint=Prod-IBM-LS&TWC-GeoIP-Country=DE&TWC-Privacy=gdpr' \
  --compressed -o $HOME/Weather_com_conky_script/now_raw "$address"
sed '/\(<span>as of\)\|\(<\/span><\/td><\/tr><\/tbody><\/table>\)/!d' $HOME/Weather_com_conky_script/now_raw > $HOME/Weather_com_conky_script/now
tr -d '\n' < $HOME/Weather_com_conky_script/now > $HOME/Weather_com_conky_script/now_temp
mv $HOME/Weather_com_conky_script/now_temp $HOME/Weather_com_conky_script/now
sed -i -e 's/^.*<span>as of//' -e 's/<\/span><\/td><\/tr><\/tbody><\/table>.*$//' $HOME/Weather_com_conky_script/now
sed -i -e 's/^.*<\/svg><\/icon><\/div><div class="today_nowcard-temp"><span class="">//' -e 's/today_nowcard-phrase">/\n/' -e 's/deg-feels">/\n/' -e 's/\(<span class="">\)\|\(<span>\)/\n/g' $HOME/Weather_com_conky_script/now
sed -i 's/<.*$//g' $HOME/Weather_com_conky_script/now
sed -i '/^$/d' $HOME/Weather_com_conky_script/now
sed -i 's/\u002F//g' $HOME/Weather_com_conky_script/now

sed '/"sunrise"/!d' $HOME/Weather_com_conky_script/now_raw > $HOME/Weather_com_conky_script/sun_moon
tr -d '\n' < $HOME/Weather_com_conky_script/sun_moon > $HOME/Weather_com_conky_script/sun_moon_temp
mv $HOME/Weather_com_conky_script/sun_moon_temp $HOME/Weather_com_conky_script/sun_moon
sed -i 's/"sunrise":"/\n"sunrise":"/' $HOME/Weather_com_conky_script/sun_moon
sed -i -e '1d' -e 's/","dayOfWeek":.*$//' $HOME/Weather_com_conky_script/sun_moon
sed -i -e 's/^.*"sunrise":"/sunrise\n/' -e 's/","sunset":"/\nsunset\n/' -e 's/","moonIcon".*"moonPhrase":"/\nmoonphrase\n/' -e 's/","moonrise":"/\nmoonrise\n/' -e 's/","moonset":"/\nmoonset\n/' -e 's/","dayOfWeek.*$//' /$HOME/Weather_com_conky_script/sun_moon
echo "" >> $HOME/Weather_com_conky_script/now
cat $HOME/Weather_com_conky_script/sun_moon >> $HOME/Weather_com_conky_script/now
rm $HOME/Weather_com_conky_script/sun_moon
sed -i -e '13s/^.*T//' -e '13s/:/END/2' -e '13s/END.*$//' -e '15s/^.*T//' -e '15s/:/END/2' -e '15s/END.*$//' -e '19s/^.*T//' -e '19s/:/END/2' -e '19s/END.*$//' -e '21s/^.*T//' -e '21s/:/END/2' -e '21s/END.*$//' $HOME/Weather_com_conky_script/now

sed '/<svg>/!d' $HOME/Weather_com_conky_script/now_raw > $HOME/Weather_com_conky_script/now_svg_classes
sed -i -e 's/^.*<svg>//' -e 's/<\/svg>.*$/<\/svg>/' $HOME/Weather_com_conky_script/now_svg_classes

sed '/<svg xmlns=/,/<\/icon>/!d' $HOME/Weather_com_conky_script/now_raw > $HOME/Weather_com_conky_script/Forecast_Images/now.svg
sed -i -e 's/<\/icon>/\n/g' -e 's/<svg xmlns=/\n<svg xmlns=/g' $HOME/Weather_com_conky_script/Forecast_Images/now.svg
sed -i '/<svg xmlns=/!d' $HOME/Weather_com_conky_script/Forecast_Images/now.svg
sed -i '/<\/svg>$/!d' $HOME/Weather_com_conky_script/Forecast_Images/now.svg
sed -i '2,$d' $HOME/Weather_com_conky_script/Forecast_Images/now.svg
sed -i 's/<\/svg>//' $HOME/Weather_com_conky_script/Forecast_Images/now.svg
cat $HOME/Weather_com_conky_script/now_svg_classes >> $HOME/Weather_com_conky_script/Forecast_Images/now.svg
colorize_svg $HOME/Weather_com_conky_script/Forecast_Images/now.svg
rm $HOME/Weather_com_conky_script/{now_raw,now_svg_classes}


###########
# 10 Days #
###########
address10=$(echo $address|sed s/$today/$tenday/)
curl \
  -H 'authority: weather.com' \
  -H 'cache-control: max-age=0' \
  -H 'upgrade-insecure-requests: 1' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Safari/537.36' \
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'sec-fetch-site: none' \
  -H 'sec-fetch-mode: navigate' \
  -H 'sec-fetch-user: ?1' \
  -H 'sec-fetch-dest: document' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cookie: logatimLevel=INFO; akacd_NxtGen-DHLS=2177452799~rv=98~id=614d27d4c75f75df7bad5550f54e64b1; speedpin=4G; ci=TWC-Locale-Group=US&X-Origin-Hint=Prod-IBM-LS&TWC-GeoIP-Country=DE&TWC-Privacy=gdpr' \
  --compressed -o $HOME/Weather_com_conky_script/10days_raw "$address10"
sed '/{"dayPartName"/!d' $HOME/Weather_com_conky_script/10days_raw > $HOME/Weather_com_conky_script/10days
sed -i 's/{"dayPartName"/\n{"dayPartName"/g' $HOME/Weather_com_conky_script/10days
sed -i -e '/{"dayPartName"/!d' -e '/{"dayPartName":null/d' $HOME/Weather_com_conky_script/10days
sed -i 's/\(validDate.*}}]}\).*$/\1/' $HOME/Weather_com_conky_script/10days
sed -i 's/\("humidityPct":.*\),"qualifier".*$/\1/g' $HOME/Weather_com_conky_script/10days
sed -i -e 's/\(":"\)\|\(","\)\|\(":\)\|\(\,"\)\|\("}},{"\)/\n/g' -e 's/"}//g' -e 's/}]}//g' $HOME/Weather_com_conky_script/10days
sed -i '/{"dayPartName/d' $HOME/Weather_com_conky_script/10days
sed -i 's/\u002F//g' $HOME/Weather_com_conky_script/10days

sed '/<svg>/!d' $HOME/Weather_com_conky_script/10days_raw > $HOME/Weather_com_conky_script/10days_svg_classes
sed -i -e 's/^.*<svg>//' -e 's/<\/svg>.*$/<\/svg>/' $HOME/Weather_com_conky_script/10days_svg_classes

sed '/<svg xmlns=/,/<\/icon>/!d' $HOME/Weather_com_conky_script/10days_raw > $HOME/Weather_com_conky_script/10days_svgs
sed -i -e 's/<\/icon>/\n/g' -e 's/<svg xmlns=/\n<svg xmlns=/g' $HOME/Weather_com_conky_script/10days_svgs
sed -i '/<svg xmlns=/!d' $HOME/Weather_com_conky_script/10days_svgs
sed -i '/<\/svg>$/!d' $HOME/Weather_com_conky_script/10days_svgs
for (( i=1; i<=15; i++ ))
	do
		sed -n ${i}p $HOME/Weather_com_conky_script/10days_svgs > $HOME/Weather_com_conky_script/Forecast_Images/d$i.svg
		sed -i 's/<\/svg>//' $HOME/Weather_com_conky_script/Forecast_Images/d$i.svg
		cat $HOME/Weather_com_conky_script/10days_svg_classes >> $HOME/Weather_com_conky_script/Forecast_Images/d$i.svg
		colorize_svg $HOME/Weather_com_conky_script/Forecast_Images/d$i.svg
	done
rm $HOME/Weather_com_conky_script/{10days_svgs,10days_raw,10days_svg_classes}


##########
# Hourly #
##########
addressH=$(echo $address|sed s/$today/$hourly/)
curl \
  -H 'authority: weather.com' \
  -H 'cache-control: max-age=0' \
  -H 'upgrade-insecure-requests: 1' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Safari/537.36' \
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'sec-fetch-site: none' \
  -H 'sec-fetch-mode: navigate' \
  -H 'sec-fetch-user: ?1' \
  -H 'sec-fetch-dest: document' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cookie: logatimLevel=INFO; akacd_NxtGen-DHLS=2177452799~rv=98~id=614d27d4c75f75df7bad5550f54e64b1; speedpin=4G; ci=TWC-Locale-Group=US&X-Origin-Hint=Prod-IBM-LS&TWC-GeoIP-Country=DE&TWC-Privacy=gdpr' \
  --compressed -o $HOME/Weather_com_conky_script/hourly_raw "$addressH"
sed '/\[{"processTime"/!d' $HOME/Weather_com_conky_script/hourly_raw > $HOME/Weather_com_conky_script/hourly
sed -i 's/^.*\[{"processTime"/{"processTime"/' $HOME/Weather_com_conky_script/hourly
sed -i 's/{"processTime":"/\n/g' $HOME/Weather_com_conky_script/hourly
sed -i '$d' $HOME/Weather_com_conky_script/hourly
sed -i 's/\(,"\)\|\(":\)/\n/g' $HOME/Weather_com_conky_script/hourly
sed -i 's/\("\)\|\(},\)//g' $HOME/Weather_com_conky_script/hourly
sed -i '/^$/d' $HOME/Weather_com_conky_script/hourly
for (( i=1; i<=1335; i+=29 ))
	do
		sed -i -e ${i}s/^.*T// -e ${i}s/:/END/2 -e ${i}s/END.*$// $HOME/Weather_com_conky_script/hourly
	done
sed -i 's/\u002F//g' $HOME/Weather_com_conky_script/hourly

sed '/<svg>/!d' $HOME/Weather_com_conky_script/hourly_raw > $HOME/Weather_com_conky_script/hourly_svg_classes
sed -i -e 's/^.*<svg>//' -e 's/<\/svg>.*$/<\/svg>/' $HOME/Weather_com_conky_script/hourly_svg_classes

sed '/<svg xmlns=/,/<\/icon>/!d' $HOME/Weather_com_conky_script/hourly_raw > $HOME/Weather_com_conky_script/hourly_svgs
sed -i 's/^.*main-HourlyForecast//' $HOME/Weather_com_conky_script/hourly_svgs
sed -i -e 's/<\/icon>/\n/g' -e 's/<svg xmlns=/\n<svg xmlns=/g' $HOME/Weather_com_conky_script/hourly_svgs
sed -i '/<svg xmlns=/!d' $HOME/Weather_com_conky_script/hourly_svgs
sed -i '/<\/svg>$/!d' $HOME/Weather_com_conky_script/hourly_svgs
for (( i=1; i<=16; i++ ))
	do
		sed -n ${i}p $HOME/Weather_com_conky_script/hourly_svgs > $HOME/Weather_com_conky_script/Forecast_Images/h$i.svg
		sed -i 's/<\/svg>//' $HOME/Weather_com_conky_script/Forecast_Images/h$i.svg
		cat $HOME/Weather_com_conky_script/hourly_svg_classes >> $HOME/Weather_com_conky_script/Forecast_Images/h$i.svg
		colorize_svg $HOME/Weather_com_conky_script/Forecast_Images/h$i.svg
	done
rm $HOME/Weather_com_conky_script/{hourly_svgs,hourly_raw,hourly_svg_classes}


########################
# Convert svgs to pngs "
########################
for i in $HOME/Weather_com_conky_script/Forecast_Images/*.svg
do
	fn=$(basename "$i")
	n=${fn%.*}
	convert -background none $HOME/Weather_com_conky_script/Forecast_Images/"$n".svg $HOME/Weather_com_conky_script/Forecast_Images/"$n".png
done
rm $HOME/Weather_com_conky_script/Forecast_Images/*.svg


########################
# Resume weather conky #
########################
pkill -CONT -xf "$weather_conky_launch_command"

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

#3466 2020-06-01 00:44:59

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,218

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

TeoBigusGeekus wrote:

Right...
I think weather.com's started some accuweather.com's tricks.
Replacing wget with curl seems to solve the problem.
Beta testers are always welcome.

Consider it beta tested and passed:

2020-05-31-214506-S11.jpg

LOOKS GOOD!!!!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3467 2020-06-01 07:16:11

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

Thanks S11, let's see if the cookie retains its value or it will expire any time soon.


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

#3468 2020-06-01 15:29:24

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

^Thanks Teo, the first start already looks good!  wink
ec8nuq3t.png

Direct link.

Offline

#3469 2020-06-01 18:44:30

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

Excellent unklar, looks like ΚΑΙΡΟΣ is here to stay wink
I'll leave it be for maybe a day and then I'll update the script.
Danke schoen!


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

#3470 2020-06-01 18:58:52

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

^^Thanks, Teo, for your bright ideas. smile

In the meantime (since about 16:00 hour; 4:00PM) 4 machines are running here with the new script.
During the starts and subsequent updates there hasn't been an error so far. The data was always fetched completely and displayed correctly.

I am proud of you!   devil  big_smile

Offline

#3471 2020-06-01 19:21:31

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

Danke dir mein Herr für deine Unterstüzung!


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

#3472 2020-06-01 19:45:07

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

^^^Buddy is better  wink
Lord sounds so aristocratic...   lol

Offline

#3473 2020-06-01 19:50:52

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,347

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

Also, mein Freund?


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

#3474 2020-06-01 19:54:14

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

Yes  cool

Offline

#3475 2020-06-01 19:57:22

unklar
Member
Registered: 2015-10-31
Posts: 1,192

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

Sector11 wrote:

Consider it beta tested and passed:

https://ibb.co/mJrqCpY

LOOKS GOOD!!!!

Hello, my friend  smile

Do you have a link for this extraordinary wallpaper?

Thanks!

Offline

Board footer

Powered by FluxBB