You are not logged in.

#3276 2020-03-14 19:43:59

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

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

unklar wrote:
TeoBigusGeekus wrote:

...
So it's good that you remind me that it's a real problem...

Thanks Teo, for your clear opinion. I will always be here if you need a tester.   wink


Sector11 wrote:

last: weather_com

 12 Mar 20 @ 13:25:01 ~
   $ /media/5/Conky/Weather_com_conky_script/weather_com
rm: cannot remove '/media/5/Conky/Weather_com_conky_script/Forecast_Images/*.svg': No such file or directory
 
 12 Mar 20 @ 13:25:10 ~
   $ 

Tell me if you can help and what you might need and you got it.

This is related to the problem mentioned above. Conky is (still) too fast for Teo's script.  big_smile

OH   OK ....  I wait for Master Teo and his Script-Fu  big_smile


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

Offline

#3277 2020-03-14 23:50:25

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

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

Sector11 wrote:

I was thinking CV-19 got Teo. PANIC  My friend ... MORE PANIC ....
SOOOOOOOOOOOO glad to see you.

I'm hale and hearty, at least for now; if CV-19 is a plot from accuweather to get rid of me, it's failed miserably.

As for the script, it's a matter of the webpages that take a long time to download.
This is not an easy one, conky behaves differently when paused by the pkill command and when running for the first time at boot up.


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

#3278 2020-03-16 13:08:30

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

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

TeoBigusGeekus wrote:
Sector11 wrote:

I was thinking CV-19 got Teo. PANIC  My friend ... MORE PANIC ....
SOOOOOOOOOOOO glad to see you.

I'm hale and hearty, at least for now; if CV-19 is a plot from accuweather to get rid of me, it's failed miserably.

That's a given actually, if one stops and thinks about it.  Look at all the times these sites have laid out trap for you.  You always figure them out..

As for the script, it's a matter of the webpages that take a long time to download.
This is not an easy one, conky behaves differently when paused by the pkill command and when running for the first time at boot up.

OK as we all know I am not a programmer but I am an idea guy so let toss out an idea.

Your scripts end with this:

#################
pkill -CONT -xf "$weather_conky_launch_command"

delay the restarting conky IF the uptime is less than 2|3 minutes

#################
start loop
if "uptime" < 2 min ; goto start loop
exit loop
pkill -CONT -xf "$weather_conky_launch_command"

I'd be a months pension check you know how you can do that

OR maybe remove the "rm" commands from the script giving conky "something to read while the script is updating - old stuff on first run - then at the end of your scripts:

pkill -STOP -xf "$weather_conky_launch_command" ; sleep 2 ; pkill -CONT -xf "$weather_conky_launch_command"

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

Offline

#3279 2020-03-16 22:06:10

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

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

Something like this was my initial thought, ie. check

/proc/uptime

for the, well, uptime...
and delete the now, 10days and hourly files, as well as the pngs and svgs in the Forecast_Images folder, only if the pc has been running for more than 300sec or whatever.
But this would only solve the problem partially, as the images and forecast would still disappear for a few seconds between conky updates.

So, I tried the following and it works, but I had to sacrifice cleaning up the files and the images:
Delete the lines that clean up the now, hourly and 10days files, as well as the forecast images, before new files and images are created by the script

#!/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 #
#######
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
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
	done
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
	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"

As you can see, the clean up section has been removed.
This takes care of the empty conky between updates.
Due to the time it takes for the web pages to be downloaded from weather.com and the fact that the previous version of the script deleted all data before downloading everything again, there was a small amount of time (couple of seconds) in which the user was left with an empty desktop.
Well, not anymore...

But what about fresh data when I start my pc?
I solved this by running the script once before I launch conky in my autostart file

# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# Set a background color
BG=""
if which hsetroot >/dev/null 2>&1; then
    BG=hsetroot
else
    if which esetroot >/dev/null 2>&1; then
	BG=esetroot
    else
	if which xsetroot >/dev/null 2>&1; then
	    BG=xsetroot
	fi
    fi
fi
test -z $BG || $BG -solid "#303030"

# D-bus
if which dbus-launch >/dev/null 2>&1 && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
       eval `dbus-launch --sh-syntax --exit-with-session`
fi

# Make GTK apps look and behave how they were set up in the gnome config tools
if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
  /usr/libexec/gnome-settings-daemon &
elif which gnome-settings-daemon >/dev/null 2>&1; then
  gnome-settings-daemon &
# Make GTK apps look and behave how they were set up in the XFCE config tools
elif which xfce-mcs-manager >/dev/null 2>&1; then
  xfce-mcs-manager n &
fi

# Preload stuff for KDE apps
if which start_kdeinit >/dev/null 2>&1; then
  LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi

# Run XDG autostart things.  By default don't run anything desktop-specific
# See xdg-autostart --help more info
DESKTOP_ENV="OPENBOX"
if which /usr/lib/openbox/xdg-autostart >/dev/null 2>&1; then
  /usr/lib/openbox/xdg-autostart $DESKTOP_ENV
fi
bash /home/teo/Weather_com_conky_script/weather_com
expressvpn connect smart &
numlockx &
setxkbmap -option grp:switch,grp:win_space_toggle,grp_led:scroll us,el &
bash ~/.fehbg &
conky -b -c /home/teo/.conkyrc_nighthawks &

As you can see, before I start conky, I execute the weather.com script once (WITHOUT an ambersand, so that it first finishes its job and then control is passed to the next command) and I now have fresh data, even on first launch.
You can do something similar with whatever window manager/deskop environment you have.

As I said, this solution sacrifices the cleaning up of the files before every script update, so if the latter fails for some reason, the user will be seeing the same forecast again and again and again.
But if it is midnight and conky's still reporting afternoon weather, then you should know that something's not right, shouldn't you?
Also, I think a couple of seconds have been added to my pc boot time (it makes sense), but I've never cared about whether my rig boots up in 10, 12 or 20 seconds, as long as it is within a reasonable amount of time.

Try it and tell me what you think, it runs really smoothly on my system.

Last edited by TeoBigusGeekus (2020-03-16 22:09:31)


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

#3280 2020-03-17 08:38:23

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

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

TeoBigusGeekus wrote:

and delete the now, 10days and hourly files, as well as the pngs and svgs in the Forecast_Images folder, only if the pc has been running for more than 300sec or whatever.
But this would only solve the problem partially, as the images and forecast would still disappear for a few seconds between conky updates.

I solve this problem by updating to a separate location, and only moving the new config on top of the current config in the very last step.

...

Sorry, are you downloading all forecast images anew each time the conky updates???


BL quote proposals to this thread please.
my repos / my repos

Offline

#3281 2020-03-17 09:09:37

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

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

Yes I do.

Last edited by TeoBigusGeekus (2020-03-17 14:35:25)


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

#3282 2020-03-17 17:02:33

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

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

Sector11 wrote:

@ unklar

Der Konkystador und Freund unklar

I am a simple Conky user.
I can't even begin to "hold a candle" to you  big_smile
Thanks for the flowers.  cool


Teo, I can confirm Conky's behavior upstairs
However, I have an error in my configuration here.
Because, the pictures are always the same for the days and (opposite) the hours (e.g. d2.png <--> h2.png)

I have your script for the autostart in lithium in the
conky-sessionfile.
e.g.

wmctrl -s 1 && ./weather_start.sh & sleep 1

Offline

#3283 2020-03-17 17:06:49

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

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

Look in your conkyrc for potential mistakes in the images' names.


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

#3284 2020-03-17 17:10:18

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

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

unklar wrote:
Sector11 wrote:

@ unklar

Der Konkystador und Freund unklar

I am a simple Conky user.
I can't even begin to "hold a candle" to you  big_smile
Thanks for the flowers.  cool

Do not fool yourself, you are better than you think you are.


@Teo, I have been up and doing things for 8 hours already.  But nothing I want to do so have not tested weather_com.  sad

LIFE!  GRRRRRRRR!

But it's better than the other option.


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

Offline

#3285 2020-03-17 22:20:10

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

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

Sector11 wrote:

LIFE!  GRRRRRRRR!

But it's better than the other option.

Amen to that buddy!


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

#3286 2020-03-18 08:08:22

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

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

^ It seems to me that with me it takes longer to find the error. Because, a comparison with your original shows that not only are the images of the days and hours identical...    hmm

vergl2.th.png

Offline

#3287 2020-03-18 10:53:10

ceeslans
Member
Registered: 2015-09-30
Posts: 93

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

@unklar, dont know what is going wrong at your end...
but I believe that the script is actually creating png images that correspond with the icons shown on Weather.com website.
see below screenshot

XppcNput.png

Last edited by ceeslans (2020-03-18 11:16:39)

Offline

#3288 2020-03-18 11:28:41

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

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

@ceeslans
That's exactly what the script does.

@unklar
Have you tinkered with the if_match commands?
Can you try with the English version as well?


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

#3289 2020-03-18 13:29:37

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

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

TeoBigusGeekus wrote:
Sector11 wrote:

LIFE!  GRRRRRRRR!

But it's better than the other option.

Amen to that buddy!

Agreed ... means I get to play with conky again.

OK here it is:
2020-03-18-101559-S11.jpg
seems to match Accuweather pretty close.  Lets see what time does to it.

Like the "autostart" trick, here's mine:

## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
## For commented version of autostart SEE:
## medit /home/sector11/.config/openbox/autostart-2020-03-05

##############################################################################
## bash /home/teo/Weather_com_conky_script/weather_com
##
## As you can see, before I start conky, I execute the weather.com script once
## (WITHOUT an ambersand, so that it first finishes its job and then control
## is passed to the next command) and I now have fresh data, even on first
## launch.
bash /media/5/Conky/Weather_com_conky_script/weather_com
##############################################################################

xset -dpms &
xset s off &
xset -b &
nitrogen --restore &
compton --config ~/.config/compton/S11.compton.conf &
thunar --daemon &
fbpanel &
(sleep 1s && volumeicon) &
(sleep 1s && artha) &
(sleep 1s && discord --start-minimized) &
(sleep 2s && /media/5/Conky/OBMenuS/S11_Current.sh) &

exit

Means I have a black screen with a mouse pointer for a few seconds before the desktop starts to fill up  - PERFECT - tells me it is working.

S11_Current.sh - if anyone is interested:

#!/bin/bash

killall conky

# on desktop 7 = wmctrl -s 6
###############################

# on desktop 6 = wmctrl -s 5
###############################

# on desktop 5 = wmctrl -s 4
###############################

# on desktop 4 = wmctrl -s 3
###############################
 (sleep 0 && wmctrl -s 3 && conky -c ~/.conkyrc) &

# on desktop 3 = wmctrl -s 2
###############################
 (sleep 1 && wmctrl -s 2 && conky -c /media/5/Conky/Weather_com_conky_script/unklar-1_1.9.conky) &
#(sleep 1 && wmctrl -s 1 && conky -q -c /media/5/Conky/S11_Dates.conky) &
# on desktop 2 = wmctrl -s 1
###############################
 (sleep 2 && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
 (sleep 2 && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &

# on desktop 1 = wmctrl -s 0
###############################
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_Rem_Today.conky) &
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/time.conky) &
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_thin_r2_side.conky) &
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_thin_l2_side.conky) &
#(sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_DateTime_br.conky) &
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_MD_Cal-br.conky) &
 (sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_Email_0.conky) &
#(sleep 3 && wmctrl -s 0 && conky -c /media/5/Conky/S11_Email_1.conky) &


#(sleep 4 && wmctrl -s 0 && conky -c /media/5/Conky/Accuweather_conky_script/S11_accu_tm_BAR_2015-full.conky) &
 (sleep 4 && wmctrl -s 0 && conky -c /media/5/Conky/Accuweather_conky_script/S11_accu_tm_BAR_2016-full.conky) &
 (sleep 4 && wmctrl -s 0 && conky -c /media/5/Conky/Accuweather_conky_script/S11_accu_UVI.conky) &

# on all desktops
##########################
 (sleep 4 && wmctrl -s 0 && conky -c /media/5/Conky/Eagle.conky) &

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

Offline

#3290 2020-03-18 14:52:56

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

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

Excuse me, dear friends.
The error was 50 cm in front of the screen.  ops

We are having such wonderful weather here at the moment for mid-March. I was not concentrated and was more occupied with the most valuable invention of mankind. He does all the work for me..

I had forgotten to set up the new script correctly for my location:  roll 

... 
today=heute
tenday=10tage
hourly=stundlich
...

EVERYTHING is fine, @Teo and @ceeslans  big_smile

Offline

#3291 2020-03-18 17:05:34

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

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

unklar wrote:

Excuse me, dear friends.
The error was 50 cm in front of the screen.  ops

haha.png My Brother! haha.png Proof we are kin.

We are having such wonderful weather here at the moment for mid-March. I was not concentrated and was more occupied with the most valuable invention of mankind. He does all the work for me..

Give him a broom/mop attachment and I could use him in the patio.

Nice machine!

I had forgotten to set up the new script correctly for my location:  roll 

... 
today=heute
tenday=10tage
hourly=stundlich
...

EVERYTHING is fine, @Teo and @ceeslans  big_smile

Glad to hear it unklar.


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

Offline

#3292 2020-03-18 17:33:06

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

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

Brilliant!!!
I'm waiting for feedback abour the smoothness of the updates, as well as conkys behavior when run at boot up

EDIT:

unklar wrote:

We are having such wonderful weather here at the moment for mid-March. I was not concentrated and was more occupied with the most valuable invention of mankind. He does all the work for me..

What's this exactly?

Last edited by TeoBigusGeekus (2020-03-19 07:55:56)


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

#3293 2020-03-19 11:10:51

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

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

^^TEST with bl-lithium and archlinux

-the update_interval = 1,
-lithium with your start script
-archlinux without the start script

1. the directory(We_com_conky_script) is NOT empty
Bl, the Conky appears after more than 10 seconds completely filled with partial data from the previous start.
The data is displayed correctly in the second run.

archlinux, the Conky appears after +5 seconds with the data from the previous start and is displayed after
(texeci 600...) displayed correctly (the script starts with texeci 500...)

2. the directory(We_com-conky_script) IS empty
Bl, the Conky appears after ~20 seconds completely filled with the current data and pictures - super smile

archlinux, the conky appears immediately and is empty. Bit by bit the current images are displayed.
The current data only appear after the second run after 8.3 minutes.


PS: yes and, it's exactly what S11 says

My Brother! Proof we are kin.

  big_smile   I forgot something again Teo:
the updates of the Conky with your new script are not noticed by the user. Unless he has the file manager open and sees this in the directory Weather_com_conky_script

Last edited by unklar (2020-03-19 12:15:49)

Offline

#3294 2020-03-19 11:27:54

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

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

TeoBigusGeekus wrote:

...

What's this exactly?

He mows the lawn for me. In spring I prepare the area so that the robot does not suffer any damage after the long winter break. For this purpose it drives fully automatically within a wire loop.
In time, the weeds disappear. We have never had such a beautiful lawn before. big_smile We got to know this technique in Austria and Scotland ~2014.

Offline

#3295 2020-03-19 11:33:43

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

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

Sector11 wrote:

My Brother! Proof we are kin.

OMG, I'd like a much bigger leprechaun. 

As always, my friend, you hit the nail on the head! devil
Because laughter is healthy!  big_smile

Offline

#3296 2020-03-19 14:36:21

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

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

@ unklar laughter is the best medicine.
- - - @GrassBot - Sie haben die NE-Ecke vergessen - gehen Sie jetzt!
You gotta teach that Bot English.

This is why I said GrassBot with a Broom/Mop attachment would be good here:
2020-03-19-095910-S11.jpg
Click for full image - has WETTER conky on it.
That's our "Back Yard" - a tiny courtyard in a city of ±14.5M
I could move everything to one side this week and then the other side next week.  And since all the floors in the house are ceramic tiles, I'd let it loose in the house too.  lol  lol  lol

Because covid-19 and quarantine laws/common sense - we have lost our cleaning lady.
Guess who our new "cleaning man" is!  sad  sad  sad

Note to SELF: Must redo that conky in English and BIGGER font for my old eyes  big_smile

@Teo ...

weather_com is working just fine.

I repeat:

> 1. my OpenBox "autostart" script populates weather_com files via your idea, 2 thumbs up on that idea:

bash /media/5/Conky/Weather_com_conky_script/weather_com

> 2. the last line in "autostart" calls my bash script to start all conkys.
> 3. first conky called is ~/.conkyrc that collects ALL weather stuff so that any weather conky I create simply uses the existing data, the weather conkys do not actually call the weather data:

TEXT
${execpi 900 /media/5/Conky/Accuweather_conky_script/accuweather -f2015 -h2015 -f2016 -h2016}\
${execpi 900 /media/5/Conky/Moongiant_conky_script/moongiant}\
${execpi 900 /media/5/Conky/Weather_com_conky_script/weather_com}\

> 4. the scripts themselves refer to the conky that is running the weather:

weather_conky_launch_command="conky -c /media/5/Conky/Weather_com_conky_script/unklar-1_1.9.conky"

> 5 if you recall in the past I had multiple instances of that line - remember the clocks  big_smile

weather_conky_launch_command="conky -c /media/5/Conky/Weather_com_conky_script/unklar-1_1.9.conky"
weather_conky_launch_command="conky -c /media/5/Conky/Weather_com_conky_script/Right-mid_wea-com.conky"
weather_conky_launch_command="conky -c /media/5/Conky/Weather_com_conky_script/top_bar-wea.com.conky"

> 6. that seemed to work fine
> 7. and finally the conkys update every 2 seconds checking the weather "data" every 3 minutes.

OK, I know it is a bit of an overkill, stop that snickering in the back row please and hear me out, but in my hayday I was running multiple versions of your scripts for test purposes AND creating or testing conkys for others as well and did not want to put a burden on my system calling weather_com 5 times, moon-giant 4 times and wunderground 4 times.  Once each was enough.

I'm making a comeback


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

Offline

#3297 2020-03-19 17:05:24

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

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

Sector11 wrote:

I could move everything to one side this week and then the other side next week.  And since all the floors in the house are ceramic tiles, I'd let it loose in the house too. lol lol lol

He makes 62 square meters in an hour.
He would be hopelessly underachieving and you, no doubt, extremely overachieving.   big_smile  tongue  and, he refuses to clean...   big_smile

Offline

#3298 2020-03-19 21:09:42

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

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

unklar wrote:

He makes 62 square meters in an hour.
He would be hopelessly underachieving and you, no doubt, extremely overachieving.   big_smile  tongue  and, he refuses to clean...   big_smile

Bad Bot, BAD BAD BAD!   devil

Outsmarted by a Bot.  sad
Does he have a union?


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

Offline

#3299 2020-03-19 22:23:50

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

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

@S11
Good to know that everything works great. It's even better to know that you're back to conky land wink

@unklar
In both BL and Arch the conky should be fully populated with the correct data on startup.
What's your autostart file? (assuming you run openbox of course)


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

#3300 2020-03-20 02:08:39

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

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

I'll do my best to not let you down Teo.  big_smile


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

Offline

Board footer

Powered by FluxBB