You are not logged in.

#1681 2017-06-16 17:14:50

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

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

chairman67 wrote:
Sector11 wrote:

Yea go get some sleep ... 9:30ish in the AM is a LONG night.

Actually it was more like 0730ish being that I am currently living in China !

Well hey, I can't know everything.  Conky I know - reasonable well.
Peoples locations on the blue marble not so much.  big_smile
I see "From:" and "Australia" - how am I to know.  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1682 2017-06-16 19:20:30

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Sector11 wrote:

@ ragamatrix

Are wou running the latest script:
2) WUnderground API - All users - 2_4-3-17

your "2_wun" is either: 1) old or 2) modified - in which case we need to see it.

Without your images and using your code below "conky.text = [[" in conky v1.9 I get it:
https://cdn.scrot.moe/images/2017/06/16 … crot11.jpg

Thanks a lot as usual Sector11 wink
I don't know exactly what's the good script but I send you the one I'm running:
2_wun:

#!/bin/bash

#put your hemisphere here: n for north, s for south
hemisphere=n

#put your Weather Underground address API here
address="http://api.wunderground.com/api/xxxxxxxxxxxxxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/Switzerland/horgen.json"

wun_icon_to_png () {
    if [[ $1 == day ]]; then
        case $2 in
            chanceflurries)
                echo 21
            ;;
            chancerain)
                echo 14
            ;;
            chancesleet)
                echo 26
            ;;
            chancesnow)
                echo 20
            ;;
            chancetstorms)
                echo 17
            ;;
            clear)
                echo 1
            ;;
            cloudy)
                echo 7
            ;;
            flurries)
                echo 21
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 5
            ;;
            mostlycloudy)
                echo 6
            ;;
            mostlysunny)
                echo 4
            ;;
            partlycloudy)
                echo 4
            ;;
            partlysunny)
                echo 6
            ;;
            sleet)
                echo 26
            ;;
            rain)
                echo 18
            ;;
            snow)
                echo 22
            ;;
            sunny)
                echo 1
            ;;
            tstorms)
                echo 15
            ;;
            unknown)
                echo 0
            ;;
        esac
    elif [[ $1 == night ]]; then
        case $2 in
            chanceflurries)
                echo 43
            ;;
            chancerain)
                echo 39
            ;;
            chancesleet)
                echo 40
            ;;
            chancesnow)
                echo 43
            ;;
            chancetstorms)
                echo 41
            ;;
            clear)
                echo 33
            ;;
            cloudy)
                echo 38
            ;;
            flurries)
                echo 43
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 37
            ;;
            mostlycloudy)
                echo 36
            ;;
            mostlysunny)
                echo 35
            ;;
            partlycloudy)
                echo 35
            ;;
            partlysunny)
                echo 36
            ;;
            sleet)
                echo 40
            ;;
            rain)
                echo 40
            ;;
            snow)
                echo 44
            ;;
            sunny)
                echo 33
            ;;
            tstorms)
                echo 41
            ;;
            unknown)
                echo 0
            ;;
        esac
    fi
    }

rm $HOME/2_Wunderground_API/*.png

killall -STOP conky
killall wget

wget -O $HOME/2_Wunderground_API/raw_data $address

#Conditions feature
sed -n '/,	"current_observation": {/,/,	"satellite": {/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Conditions
sed -i 's/^[ \t]*"//g' $HOME/2_Wunderground_API/Conditions
sed -i '/current_observation\|image":\|logo_\|title":\|link":\|^[ \t]*},$\|^[ \t]*}$\|temperature_string\|forecast_url\|history_url\|ob_url\|satellite":/d' $HOME/2_Wunderground_API/Conditions
sed -i -e 's/":"/\n/g' -e 's/",\|": {$//g' -e 's/"precip_1hr_string/\nprecip_1hr_string/g' -e 's/":/\n/g' -e 's/,$//g' $HOME/2_Wunderground_API/Conditions
sed -i -e 's/^http.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2_Wunderground_API/Conditions
day_or_night=$(sed -n 137p $HOME/2_Wunderground_API/Conditions)
if [[ $day_or_night == nt ]]; then
	cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n 135p $HOME/2_Wunderground_API/Conditions)).png $HOME/2_Wunderground_API/Now.png
else 
	cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n 135p $HOME/2_Wunderground_API/Conditions)).png $HOME/2_Wunderground_API/Now.png
fi

#Satellite feature, commented out by default, uncomment if you wish so
#sed -n '/,	"satellite": {/,/"forecast":{/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Satellite
#sed -i 's/^[ \t]*"//g' $HOME/2_Wunderground_API/Satellite
#sed -i -e '/image/!d' -e 's/^.*": "//g' -e 's/".*$//g' $HOME/2_Wunderground_API/Satellite
#for (( i=1; i<=3; i++ ))
#	  do
#          wget -O $HOME/2_Wunderground_API/sat_pic$i.png $(sed -n ${i}p $HOME/2_Wunderground_API/Satellite)
#	  done

#Forecast feature: Forecast
sed -n '/"forecast":{/,/"simpleforecast": {/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Forecast
sed -i -e '/"period":\|icon_url/d' $HOME/2_Wunderground_API/Forecast
sed -i 's/^[ \t]*"//g' $HOME/2_Wunderground_API/Forecast
sed -i -e '/period\|icon\|title\|fcttext/!d' -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",//g' -e 's/,$//g' -e 's/nt_//g' $HOME/2_Wunderground_API/Forecast

#Forecast feature: Simple Forecast
sed -n '/"simpleforecast": {/,/"hourly_forecast": \[/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Simple_Forecast
sed -i 's/^[ \t]*"//g' $HOME/2_Wunderground_API/Simple_Forecast
sed -i '/hourly_forecast\|simpleforecast\|forecastday\|{"date"\|period\|icon_url\|^[ \t]*},$\|^[ \t]*}$\|^[ \t]*,$\|^[ \t]*\]$/d' $HOME/2_Wunderground_API/Simple_Forecast
sed -i -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",$//g' -e 's/,$//g' -e 's/"$//g' $HOME/2_Wunderground_API/Simple_Forecast
sed -i '/^[ \t]*{/d' $HOME/2_Wunderground_API/Simple_Forecast
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2_Wunderground_API/Simple_Forecast
for (( i=2; i<=146; i+=16 ))
    do
        cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2_Wunderground_API/Forecast)).png $HOME/2_Wunderground_API/d$(( 1+(i-2)/16 )).png
        j=$(( i+8 ))
        cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${j}p $HOME/2_Wunderground_API/Forecast)).png $HOME/2_Wunderground_API/n$(( 1+(i-2)/16 )).png
    done

#Forecast feature: Hourly
sed -n '/"hourly_forecast": \[/,/"moon_phase": {/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Hourly
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2_Wunderground_API/Hourly
sed -i '/hourly_forecast\|FCTTIME\|^{$\|^},$\|^}$\|^,$\|^]$\|moon_phase/d' $HOME/2_Wunderground_API/Hourly
sed -i -e 's/": /\n/g' -e 's/","/\n/g' -e 's/", "/\n/g' $HOME/2_Wunderground_API/Hourly
sed -i -e 's/^""//g' -e 's/^"//g' -e 's/^{"//g' -e 's/"},$//g' -e 's/",$//g' $HOME/2_Wunderground_API/Hourly 
sed -i -e 's/^},//g' -e 's/"}$//g' -e 's/^,//g' $HOME/2_Wunderground_API/Hourly
sed -i -e 's/^icon_url.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2_Wunderground_API/Hourly
sed -i -e '/min_unpadded\|UTCDATE/,+1d' $HOME/2_Wunderground_API/Hourly
for (( i=64; i<=4212; i+=117 ))
    do
		j=$(( i+1 ))
		day_or_night=$(sed -n ${j}p $HOME/2_Wunderground_API/Hourly)
		if [[ $day_or_night == nt ]]; then
			cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${i}p $HOME/2_Wunderground_API/Hourly)).png $HOME/2_Wunderground_API/h$(( 1+(i-64)/117 )).png
		else 
			cp $HOME/2_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2_Wunderground_API/Hourly)).png $HOME/2_Wunderground_API/h$(( 1+(i-64)/117 )).png
		fi
    done
    
#Forecast feature: Moon_Sun
sed -n '/"moon_phase": {/,/"sun_phase": {/p' $HOME/2_Wunderground_API/raw_data > $HOME/2_Wunderground_API/Moon_Sun
sed -i 's/^[ \t]*"//g' $HOME/2_Wunderground_API/Moon_Sun
sed -i '/moon_phase\|^[ \t]*},$\|sun_phase\|^[ \t]*}$/d' $HOME/2_Wunderground_API/Moon_Sun
sed -i -e 's/":"/\n/g' -e 's/".*$//g' $HOME/2_Wunderground_API/Moon_Sun
moon_phase=$(sed -n 6p $HOME/2_Wunderground_API/Moon_Sun)
if [[ $moon_phase == "Waning Crescent" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"21.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Crescent" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"04.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waning Gibbous" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"17.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Gibbous" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"09.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "First Quarter" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"07.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Last Quarter" ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"19.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase =~ New.* ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"24.png" $HOME/2_Wunderground_API/Moon_phase.png
elif [[ $moon_phase =~ Full.* ]]; then
	cp $HOME/2_Wunderground_API/moonicons/$hemisphere"13.png" $HOME/2_Wunderground_API/Moon_phase.png
fi

killall -CONT conky

wun.png

== MOD EDIT:  xx'ed out your API key, it's like a password ===

Last edited by Sector11 (2017-06-16 19:34:16)

Offline

#1683 2017-06-16 19:41:17

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

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

Lines 141 and 142 comment out these

## killall -STOP conky
## killall wget

and line 232 the last line:

## killall -CONT conky

Do this in any of Teo's scripts "especially if you use more than one script"

if you run the wunderground script and the moon script for example and the moon script runs the "killall -STOP conky" while the wunderground script is doing something with conky OOPS!  See if that fixes your problem.

Meantime I'll compare the two scripts.

I also recommend doing this even if you run one of Teo's scripts and any other conky ... same thing could happen.  And has; to me.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1684 2017-06-16 20:13:36

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

lol That's all me Thank-you Sector11... I'll try your advices and give you a feedback as soon as wink

Offline

#1685 2017-06-16 20:39:20

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

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

Well then:  Welcome to the OOPS! club  smile

I've posted my key  for various websites on different occasions AND also my email passwords at times in a conky:  The fact is I've had to change my email passwords a few times because it wasn't just once.  mad <-- at the time

That's why today I use:

${execi 90 conkyEmail -t /media/5/Conky/email/S}

so if I post the conky I don't have to edit it.

  $ conkyEmail -h
{snip}
  -t FILE, --template=FILE
                        define a template file to generate output in one call.
                        A displayable item in the file is in the form
                        [--servertype=IMAP --ssl --servername=imap.gmail.com
                        --folder=Inbox --username=joebloggs
                        --password=letmein, --connectiontimeout=10]. Note that
                        the short forms of the options are not currently
                        supported! None of these options are applicable at
                        command line when used in templates.
{snip}

... uesd conkyEmail for years before I discovered that.   roll


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1686 2017-06-17 05:46:31

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

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

@ragamatrix
I've run your version of the script and it runs flawlessly without any sed error message.
Could you give us some more info on the latter one?
As for the killall commands, they're there to pause conky so that the script has time to update its data before conky updates itself.
If, however, you run more than one conky configurations no one can say for sure which conky will be paused and which one will keep going.
Remove the killall commands if you run more than one conkys.

@S11
I seem to remember something now, though being out of town for the moment I can't find the original script (not very sure I could find it even if I were in town to tell you the truth smile).
I'll try to fix it for you sometime after Monday.
EDIT: I might get access to a linux pc. Can you post the script here? Perhaps I'll find the time to have "a butcher's".

Last edited by TeoBigusGeekus (2017-06-17 07:26:11)


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

#1687 2017-06-17 10:42:47

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Hi Sector11 and Teo;
I post you the terminal message after did what you told me and I still have this sed error and the T° of the last hour not displayed.
Thanks for your help wink

 12:38 raphix > conky -c ~/2_Wunderground_API/conky-wu-htc-v-10-hours                                                        < debian:pts/0:~
conky: desktop window (dc) is root window
conky: window type - override
conky: drawing to created window (0x1c00001)
conky: drawing to double buffer
--2017-06-17 12:38:11--  http://api.wunderground.com/api/xxxxxxxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/Switzerland/horgen.json
Résolution de api.wunderground.com (api.wunderground.com)… sed: -e expression n°1, caractère 4: commande manquante
23.9.140.188
Connexion à api.wunderground.com (api.wunderground.com)|23.9.140.188|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [application/json]
Sauvegarde en : « /home/raphix/2_Wunderground_API/raw_data »

/home/raphix/2_Wunderground_API/raw     [ <=>                                                              ]  65.65K  --.-KB/s    in 0.04s   

2017-06-17 12:38:12 (1.81 MB/s) - « /home/raphix/2_Wunderground_API/raw_data » sauvegardé [67222]

Except this little error the updates are correctly working now, after fews hours running. Thanks again for your explanations to resolve the problem. Have a nice sunny week-end  cool

Last edited by ragamatrix (2017-06-17 12:50:26)

Offline

#1688 2017-06-17 13:07:09

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

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

@ragamatrix
Watch your hourly weather from the whunderground site, as long as you're not in the early hours of Sunday I think the last temperature will not be seen, but maybe I'm wrong

[url=http://i.imgur.com/w7cJzNF.png]
  w7cJzNFl.png
[/url]
edit

Now your conky works for me.
boh

[url=http://i.imgur.com/CcGuK9Y.png]
  CcGuK9Yl.png
[/url]

Last edited by ector1935 (2017-06-17 13:29:47)

Offline

#1689 2017-06-17 13:41:36

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

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

@ragamatrix
You had a typo in your conkyrc.
Change this line

${goto 190}${execi 600  sed -n '1108' $HOME/2_Wunderground_API/Hourly}°\

to this

${goto 190}${execi 600  sed -n '1108p' $HOME/2_Wunderground_API/Hourly}°\

Notice the added p after 1108.

Last edited by TeoBigusGeekus (2017-06-17 13:41:59)


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

#1690 2017-06-18 08:52:04

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

oh my ... what a shame... thx Teo I must wear my glasses more often...   Now you can enjoy a cleaner conky with few hours forecasting oh la la wink

Offline

#1691 2017-06-18 18:16:01

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

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

TeoBigusGeekus wrote:

@S11
I seem to remember something now, though being out of town for the moment I can't find the original script (not very sure I could find it even if I were in town to tell you the truth smile).
I'll try to fix it for you sometime after Monday.
EDIT: I might get access to a linux pc. Can you post the script here? Perhaps I'll find the time to have "a butcher's".

I think you misunderstood ... I was just showing it off and how it, your script, still works because the site has not changed their format.  The spacing thing is on my end of things with the ${goto}s .  big_smile

How ho idea why that happens over time.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1692 2017-06-18 18:24:29

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

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

ragamatrix wrote:

oh my ... what a shame... thx Teo I must wear my glasses more often...   Now you can enjoy a cleaner conky with few hours forecasting oh la la wink

I have a student: ragamatrix: "Duc de tpyos"  lol  lol

No offence ragamatrix.  wink


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1693 2017-06-18 19:02:48

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

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

Sector11 wrote:

I think you misunderstood ... I was just showing it off and how it, your script, still works because the site has not changed their format.  The spacing thing is on my end of things with the ${goto}s .  big_smile

How ho idea why that happens over time.

It still works after 4 years? yikes
I wish Accuweather or Wunderground would do the same...


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

#1694 2017-06-18 21:50:29

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

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

TeoBigusGeekus wrote:
Sector11 wrote:

How ho idea why that happens over time.

It still works after 4 years? yikes
I wish Accuweather or Wunderground would do the same...

What am I a Hawaiian?  How ho idea indeed!!!!   lol roll

What I meant to say was: Have no idea why that happens over time.

Yup, still after 4 years ...
shhhhhhhhhhhhhhh {don't tell the chinese}


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1695 2017-06-20 17:00:23

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Sector11 wrote:
ragamatrix wrote:

oh my ... what a shame... thx Teo I must wear my glasses more often...   Now you can enjoy a cleaner conky with few hours forecasting oh la la wink

I have a student: ragamatrix: "Duc de tpyos"  lol  lol

No offence ragamatrix.  wink

Of course not ...
harry
And THE Duke (you know him?) :
images.duckduckgo.com.gif

Last edited by ragamatrix (2017-06-20 17:11:01)

Offline

#1696 2017-06-20 21:51:26

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

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

lol  lol  lol If you smoke and drive and you're going to toss the butt out the window - make sure the window is OPEN, DUM DUM, scheeeeech!

No have not seen that, must get it, looks funny.  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1697 2017-06-21 00:03:14

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

mhhh...mhhh... you're right I think there is a "misunderstanding" with translation... sorry I'm french...  big_smile

Last edited by ragamatrix (2017-06-21 00:17:49)

Offline

#1698 2017-06-21 00:10:52

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Sector11 wrote:

lol  lol  lol If you smoke, drink and drive you're going to toss the butt out the window - make sure the window is OPEN, DUM DUM, scheeeeech!

No have not seen that, must get it, looks funny.  smile

Ooh yes ... for me a funny cult, provocative film...

Last edited by ragamatrix (2017-06-21 00:16:53)

Offline

#1699 2017-07-03 12:10:27

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Hello o/
I've tweaked a conky accuweather but strangely I've got some wget-log in my /home folder and I must do a rm wget-log* to clean... I don't know how to fix it a little help please ? wink
acccwzer.th.png
the conky:

conky.config = {
-- work in background (disabled for testing)
background = false,

-- better fonts
use_xft = true,
--xftalpha = 1,

-- update interval
update_interval = 60.0,
total_run_times = 0,

-- window settings
own_window = true,
own_window_transparent = true,
own_window_type = 'desktop',
own_window_hints = 'undecorated, below, sticky, skip_taskbar, skip_pager',
--own_window_argb_visual = true,
--own_window_argb_value = 0,

-- anti-flickering
double_buffer = true,

-- size
minimum_width = 300,
minimum_height = 0,
maximum_width = 300,

 -- shadows
draw_shades = true,
default_shade_color = 'black',

--borders
draw_outline = false,
default_outline_color = 'red',
draw_graph_borders = true,

-- frame
draw_borders = false,

-- color
default_color = 'white',
color0 = '98FB98', --PaleGreen
color1 = '778899', --LightSlateGray
color2 = 'FFD700', --Gold
color3 = 'B0E0E6', --PowderBlue
color4 = 'F4A460', --SandyBrown
color5 = 'DEB887', --BurlyWood
color6 = '00BFFF', --DeepSkyBlue
color7 = '5F9EA0', --CadetBlue
color8 = 'FFA500', --Orange
color9 = 'FF4500', --OrangeRed

-- position
alignment = 'top_right',
gap_x = 15,
gap_y = 15,

-- misc
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
if_up_strictness = 'address',

show_graph_range = false,
show_graph_scale = false,
--default_bar_height = 6,
--default_bar_width = 200,
text_buffer_size = 1000,
override_utf8_locale = true,

font = 'Liberation Sans:bold:size=9', --important for shades
template0 = 'Liberation Sans:bold:size=9',
template1 = 'Liberation Mono:bold:size=7',
lua_load = '/home/raphix/.conky/script/draw_bg.lua',
}

conky.text = [[
${execi 900 bash $HOME/1_accuweather/1_accuweather -f2016}\
${execi 900 bash  $HOME/4_Moon/moon}\
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.50} \
${image ~/.conky/HeliumPics/helium06.png -p 66,10 -s 143x108}\
${font Zerotwos:size=55}$alignc${color D4D4D4}${time %H:%M}${color}${font}
${font Shimes One PERSONAL USE:size=80}${color6}${alignc}${time %A}${font}
${font Kenyan Coffee:size=25}${color3}${alignc}${time %e %B}${color}${font}

${alignc}${color5}${execi 600 python /home/raphix/.conky/gmail.py > ~/.gm}${exec tail -n 1 ~/.gm} Mail(s)${color}
${color1}${swapbar 0}${color}
${color5}${alignc}TEMPS
${goto 20}${color3}CPU${color} ${hwmon 0 temp 1}°\
${alignr 20}${color3}SDA${color} ${hddtemp /dev/sda}°
${color1}${swapbar 0}${color}
${alignc}${color5}Intel Core i5-4460  ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}${color}${endif}${endif}%
${alignc}${color3}CPU     ${color0}%${color}     MHz
${goto 96}${color3}1${color0}     \
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${alignr 75}${color}${freq 1}
${goto 96}${color3}2${color0}     \
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${alignr 75}${color}${freq 2}
${goto 96}${color3}3${color0}     \
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${alignr 75}${color}${freq 3}
${color1}${swapbar 0}${color}
${voffset 5}${color0}${font }TOP CPU ${color8}${font }${alignr 2}TOP RAM
${font }${color0}${top name 1}${top cpu 1} %  ${alignr}${font }${color8}${top_mem name 1}${top_mem mem 1} %
${color lightgrey}${top name 2}${top cpu 2} %       ${alignr}${color lightgrey}${top_mem name 2}${top_mem mem 2} %
${color lightgrey}${top name 3}${top cpu 3} %       ${alignr}${color lightgrey}${top_mem name 3}${top_mem mem 3} %
${color lightgrey}${top name 4}${top cpu 4} %       ${alignr}${color lightgrey}${top_mem name 4}${top_mem mem 4} %
${color1}${swapbar 0}${color}
${alignc}${color3}Memory${color}  Using: ${color3} ${mem} of ${memmax}:${color8} ${memperc}%${color}
${color1}${swapbar 0}${color}
#${stippled_hr 1}

${color lightgrey}${font }hdd1: $alignc ${fs_used /} / ${fs_size /} $alignr ${color8}${fs_used_perc /}%${color}
${fs_bar 3,300 /}
${color lightgrey}${if_mounted /media/stock}hdd stock:$alignc ${fs_used /media/stock} / ${fs_size /media/stock} $alignr ${color8}${fs_used_perc /media/stock}%${color}${endif}
${fs_bar 3,300 /media/stock}
${color lightgrey}${if_mounted /media/share}share:$alignc ${fs_used /media/share} / ${fs_size /media/share} $alignr ${color8}${fs_used_perc /media/share}%${color}${endif}
${fs_bar 3,300 /media/share}
${color1}${swapbar 0}${color}
 S.T.${goto 118}Currently:${alignr}Temp\

${image $HOME/1_accuweather/forecast_2016/forecast_0.png -p 23,580 -s 250x252}\
${font Fira Mono:size=30}±${execi 300 sed -n '3p' ~/1_accuweather/curr_cond}\
${alignr}${execi 300 sed -n '2p' ~/1_accuweather/curr_cond}${font}


 UVI: ${execi 300 sed -n '9p' ~/1_accuweather/curr_cond}/11\
 ${alignr}${execi 300 sed -n '8p' ~/1_accuweather/curr_cond}:Bar


Wind: ${execi 300 sed -n '5p' ~/1_accuweather/curr_cond} ${execi 300 sed -n '6p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '7p' ~/1_accuweather/curr_cond} :Hum


 Cld: ${execi 300 sed -n '10p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '13p' ~/1_accuweather/curr_cond} :Vis


${image /home/raphix/4_Moon/0.png -p 100,845}
${alignc}${swapbar 0,50} Current Moon & Forecast ${swapbar 0,50}

${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$2}'`}\
${alignr}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_1.png -p 10,910 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_2.png -p 240,910 -s 45x45}\
${if_match "${execpi 300 sed -n '4p' /home/raphix/1_accuweather/first_days}" == "Lo"}\
${else}${execpi 300 sed -n '3p' /home/raphix/1_accuweather/first_days}${endif}\
${alignr 55}${execi 300 sed -n '8p' ~/1_accuweather/first_days}

${goto 60}${if_match "${execpi 300 sed -n '3p' /home/raphix/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '4p' /home/raphix/1_accuweather/first_days}${endif}\
${alignr}${execi 300 sed -n '9p' ~/1_accuweather/first_days}

${color5}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$2}'`}\
${alignr}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_3.png -p 10,850 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_4.png -p 240,850 -s 45x45}\
${execi 300 sed -n '13p' ~/1_accuweather/first_days}\
${alignr 55}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

${goto 60}${execi 300 sed -n '14p' ~/1_accuweather/first_days}\
${alignr}${execi 300 sed -n '19p' ~/1_accuweather/first_days}

${execi 600 sed -n '05p' $HOME/1_accuweather/hourly1}\
${goto 75}${execi 600 sed -n '09p' $HOME/1_accuweather/hourly1}\
${goto 135}${execi 600 sed -n '13p' $HOME/1_accuweather/hourly1}\
${goto 195}${execi 600 sed -n '17p' $HOME/1_accuweather/hourly1}\
${goto 260}${execi 600 sed -n '05p' $HOME/1_accuweather/hourly2}
${color8}${execi 600 sed -n '08p' $HOME/1_accuweather/first_days}°\
${goto 77}${execi 600 sed -n '30p' $HOME/1_accuweather/hourly1}°\
${goto 137}${execi 600 sed -n '32p' $HOME/1_accuweather/hourly1}°\
${goto 199}${execi 600 sed -n '34p' $HOME/1_accuweather/hourly1}°\
${goto 264}${execi 600 sed -n '36p' $HOME/1_accuweather/hourly2}°
${image $HOME/1_accuweather/hourly_2016/hourly_2.png -p 7,970  -s 45x45}
${image $HOME/1_accuweather/hourly_2016/hourly_4.png -p 77,970 -s 45x45}\
${image $HOME/1_accuweather/hourly_2016/hourly_6.png -p 137,970 -s 45x45}\
${image $HOME/1_accuweather/hourly_2016/hourly_8.png -p 197,970 -s 45x45}\
${image $HOME/1_accuweather/hourly_2016/hourly_10.png -p 262,970 -s 45x45}${color}
${voffset -70}
]]

Offline

#1700 2017-07-03 15:18:37

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

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

do the "wget" commands in the $HOME/1_accuweather/1_accuweather still have the " -q " command?

wget -q -O $HOME/1_accuweath{snip}"

That should stop those.

What is in the log files?
Are you using something else that uses 'wget' that may not have the --quiet option

man wget wrote:

Logging and Input File Options
−o logfile
−−output−file=logfile
Log all messages to logfile. The messages are normally reported to standard error.

This might work as well:

−o /dev/null

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB