You are not logged in.

#2941 2019-10-06 21:11:27

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

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

Neh, I don't think that's the culprit.
As it says after that paragraph convert is a symbolic link to magick anyway.
Something else is wrong, because when I tested the script on my brother in law's pc the svgs were all wrong, that's why convert can't process them.
Do an experiment for me will you?
Comment out the section called "Convert svgs to pngs", run the script and tell me what error messages you get.
See also the unconverted svgs in the Forecast_Images folder: do they display correctly ? (I doubt it).

Last edited by TeoBigusGeekus (2019-10-07 04:57:34)


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

#2942 2019-10-07 06:43:52

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

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

TeoBigusGeekus wrote:

Only me, you and dobbie03 have managed to get this script going.

No idea why it doesn't work in Ubuntu, Debian, etc.

Arch for the win!


"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

#2943 2019-10-07 07:42:26

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

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

Which we use by the way.


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

#2944 2019-10-07 07:45:35

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

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

TeoBigusGeekus wrote:

Do an experiment for me will you?
Comment out the section called "Convert svgs to pngs", run the script and tell me what error messages you get.
See also the unconverted svgs in the Forecast_Images folder: do they display correctly ? (I doubt it).

They are not displayed correctly.   neutral

sidu1.th.png

The versions of imagemagick:
BL = 6.9.7
sid/debian = 6.9.10
arch = 7.0.8

Offline

#2945 2019-10-07 09:36:35

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

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

Test with Mageia5 (a deceased Distri). The configuration file has been changed to syntax1.9

imagemagick version here 6.9.5.2

the images are converted and displayed correctly   yikes    big_smile

mg5_1.th.png

Last edited by unklar (2019-10-07 09:38:29)

Offline

#2946 2019-10-07 11:38:26

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

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

Last

Error message in BL

...
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2764.
convert-im6.q16: unable to open image `var(--color-icy)': Datei oder Verzeichnis nicht gefunden @ error/blob.c/OpenBlob/2701.
convert-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/DrawImage/3265.
...

2019-10-07-13-27-58_scrot.th.png

Offline

#2947 2019-10-07 12:13:04

loutch
Member
Registered: 2015-12-12
Posts: 848

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

TeoBigusGeekus wrote:

ANNOUNCEMENT
Tiny correction to the Accuweather script, thanks to loutch for reporting the bug that caused the hourly_raw1 and hourly_raw2 files to be the same.
Script corrected and pushed to git.
You can either pull it or go to line 440 of the script and change

wget -U "Oh hi Mark!" -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr1"

to

wget -U "Oh hi Mark!" -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"

hello


sorry Theo but yet at 14:12 don't work hourly_raw2 & hourly_raw1 are the same


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2948 2019-10-07 14:52:54

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

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

loutch wrote:

sorry Theo but yet at 14:12 don't work hourly_raw2 & hourly_raw1 are the same

Oh for God's sake...


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

#2949 2019-10-07 14:55:27

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
Hourly_raw2 file corrected again.
You can either pull the script again or go to line 438 of the script and replace

hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=1

with

hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2

Thanks to loutch for his feedback.

Last edited by TeoBigusGeekus (2019-10-07 14:56:39)


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

#2950 2019-10-07 14:57:11

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:

Test with Mageia5 (a deceased Distri). The configuration file has been changed to syntax1.9

imagemagick version here 6.9.5.2

the images are converted and displayed correctly   yikes    big_smile

https://cdn.scrot.moe/images/2019/10/07/mg5_1.th.png

Now this IS strange...


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

#2951 2019-10-07 14:58:53

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

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

I can confirm the error of loutch.

I have a conky here that will retrieve the next 3 hours and the next 3 days. The terminal output is:

Conky: desktop window (2400119) is subwindow of root window (a7)
Conky: window type - normal
Conky: drawing to created window (0x4400002)
Conky: drawing to double buffer
--2019-10-07 15:18:36--  http://www.accuweather.com/en/de/lichtenstein/09350/current-weather/171261
Auflösen des Hostnamen »www.accuweather.com (www.accuweather.com)«... 104.108.33.159
Verbindungsaufbau zu www.accuweather.com (www.accuweather.com)|104.108.33.159|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... Lesefehler (Die Wartezeit für die Verbindung ist abgelaufen) beim Vorspann (header).
Erneuter Versuch.

english translated:

HTTP request sent, wait for reply... Read error (The waiting time for the connection has expired) at the header.
Another attempt.

Edit: Excuse me, Teo, I read too late.   :8

Last edited by unklar (2019-10-07 15:04:40)

Offline

#2952 2019-10-07 15:14:06

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

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

wink


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

#2953 2019-10-07 15:39:49

loutch
Member
Registered: 2015-12-12
Posts: 848

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

@ Théo

anime%20(46).gif

Last edited by loutch (2019-10-08 11:49:46)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2954 2019-10-08 07:20:22

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

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

My current (accuweather) curr_cond from
today, 09:16:49

Slowly I get the crisis with accuweather...   8o

0 mm"
16 km
0.0
6

0 mm
75%
0 mm
0 mm
91%
518 m
6
0 mm
07:21 AM
06:34 PM
11:13
EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES
05:02 PM
02:13 AM
9:11
EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES
-
07:21
18:34
17:02
02:13

Offline

#2955 2019-10-08 08:36:43

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Hello

@ unklar

me too


Ich glaube, ich werde meine Scripts bald mit wunderground oder dark_sky ändern

Last edited by loutch (2019-10-08 08:40:57)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2956 2019-10-08 11:22:46

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
Curr_cond file in the Accuweather script corrected.


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

#2957 2019-10-08 11:51:36

loutch
Member
Registered: 2015-12-12
Posts: 848

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

@ Théo

You are the BEST

Thank you for your quickness and your efficiency once more!


anime%20(46).gif


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2958 2019-10-08 14:09:27

ipdeman
Member
Registered: 2019-02-13
Posts: 5

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

TeoBigusGeekus wrote:

ANNOUNCEMENT
Curr_cond file in the Accuweather script corrected.

Thanks TeoBigusGeekus,
You really stay on top of problems.

Offline

#2959 2019-10-08 14:42:03

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

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

Something tells me we're not done with Accuweather yet...


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

#2960 2019-10-09 14:20:20

loutch
Member
Registered: 2015-12-12
Posts: 848

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

@ Théo

i'm trying to use your weather_com_conky script conky .

I made some progress by modifying the script weather.com

conkyrc work i have now,hourly & 10days files in french

& some images in png (but just now , 6 days & 6 hourly)

here weather.com

#!/usr/bin/env bash


#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -c $HOME/Weather_com_conky_script/conkyrc"


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


###############
# Cleaning up #
###############
rm $HOME/Weather_com_conky_script/{now,10days,hourly}
rm $HOME/Weather_com_conky_script/Forecast_Images/{*.png,*.svg}


#######
# Now #
#######
wget -o /dev/null -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
convert -background none $HOME/Weather_com_conky_script/Forecast_Images/now.svg $HOME/Weather_com_conky_script/Forecast_Images/now.png
rm $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/)
wget -o /dev/null -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
convert -background none $HOME/Weather_com_conky_script/Forecast_Images/d$i.svg $HOME/Weather_com_conky_script/Forecast_Images/d$i.png
	done
rm $HOME/Weather_com_conky_script/Forecast_Images/d*.svg
rm $HOME/Weather_com_conky_script/{10days_svgs,10days_raw,10days_svg_classes}


##########
# Hourly #
##########
addressH=$(echo $address|sed s/$today/$hourly/)
wget -o /dev/null -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
convert -background none $HOME/Weather_com_conky_script/Forecast_Images/h$i.svg $HOME/Weather_com_conky_script/Forecast_Images/h$i.png
	done
rm $HOME/Weather_com_conky_script/Forecast_Images/h*.svg
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"

conky

1570630700.png

here forecast_images folder (no svg because rm all .svg in script)

1570630794.png



terminal

loutch@loutch-Strix-GL704GM-GL704GM:~/Bureau$ conky -c ~/Weather_com_conky_script/conkyrcvrai
conky: desktop window (c00003) is subwindow of root window (28a)
conky: window type - normal
conky: drawing to created window (0x4000001)
conky: drawing to double buffer
sed: impossible de lire /home/loutch/Weather_com_conky_script/10days: Aucun fichier ou dossier de ce type
rm: impossible de supprimer '/home/loutch/Weather_com_conky_script/Forecast_Images/*.svg': Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/10days: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/hourly: Aucun fichier ou dossier de ce type
sed: impossible de lire /home/loutch/Weather_com_conky_script/10days: Aucun fichier ou dossier de ce type
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/now.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d3.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d8.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d9.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d10.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d11.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d12.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d13.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d14.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/d15.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h3.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h8.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h9.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h10.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h11.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h12.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h13.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h14.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h15.png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: Extra content at the end of the document
 `Aucun fichier ou dossier de ce type` @ error/svg.c/SVGError/2680.
convert-im6.q16: no images defined `/home/loutch/Weather_com_conky_script/Forecast_Images/h16.png' @ error/convert.c/ConvertImageCommand/3258.
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/d7.png'
conky: Unable to load image '/home/loutch/Weather_com_conky_script/Forecast_Images/h7.png'
conky: Unable to load image '/home/loutch

Last edited by loutch (2019-10-09 14:24:21)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

Board footer

Powered by FluxBB