You are not logged in.

#601 2016-02-23 16:38:43

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

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

Here my 2b script

#!/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/xxxxxxxxxxxxxxxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.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/2b_Wunderground_API/*.png

killall -STOP conky
killall wget

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

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

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

#Forecast feature: Forecast
sed -n '/"forecast":{/,/"simpleforecast": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Forecast
sed -i -e '/"period":\|icon_url/d' $HOME/2b_Wunderground_API/Forecast
sed -i 's/^[ \t]*"//g' $HOME/2b_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/2b_Wunderground_API/Forecast

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

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

 ## English to French
cp $HOME/2b_Wunderground_API/Conditions $HOME/2b_Wunderground_API/Conditions-fr
if [[ -s $HOME/2b_Wunderground_API/Conditions-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Turning cloudy and less humid/Moins nuageux et moins humide/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly cloudy/Ciel plutôt nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/2b_Wunderground_API/Conditions-fr	
	sed -i -e 's/Cloudy/Nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A few a.m. showers,/Pluies l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Showers around in th/Quelques averses l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/breezy/Venteux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/a little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Periods of rain/Pluies intermittentes/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light Rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light/Faible/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Foggy/Brumeux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Dense fog/Brouillard dense/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light fog/Léger brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mist/Brume/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain shower/Pluie faible/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly Cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly/Partiellement/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/shower/averses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Som sun,then turni/Mitigé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Clear/Clair/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light Freezing Fog/Léger brouillard givrant/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly/Peu/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Fog/Brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Scattered Clouds/Nuages épars/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Drizzle/Bruine/' $HOME/2b_Wunderground_API/Conditions-fr
fi
	
	 sed -i -e 's/New Moon/Nouvelle Lune/g' -e 's/Waxing Crescent/Lune Montante/g' -e 's/First Quarter/Premier Quartier/g' -e 's/Waxing Gibbous/Gibeuse Croissante/g' -e 's/Full/Pleine Lune/g' -e 's/Waning Gibbous/Gibeuse Décroissante/g' -e 's/Last Quarter/Dernier Quartier/g' -e 's/Waning Crescent/Lune Déscendante/g' /$HOME/2b_Wunderground_API/Moon_Sun
         sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' /$HOME/2b_Wunderground_API/Simple_Forecast
         sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/Thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Conditions
         sed -i -e 's/Feb/Fév/g' -e 's/Apr/Avr/g' -e 's/May/Mai/g' -e 's/Jun/Jui/g' -e 's/Jul/Jui/g' -e 's/Aug/Aou/g' /$HOME/2b_Wunderground_API/Conditions
         sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/Thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Hourly
	
	
	killall -CONT conky

The Moon_Sun

percentIlluminated
100
ageOfMoon
15
phaseofMoon
Pleine Lune
hemisphere
North
current_time
hour
10
minute
53
sunrise
hour
7
minute
26
sunset
hour
18
minute
04
moonrise
hour
19
minute
02
moonset
hour
7
minute
36

@+

Last edited by loutch (2016-02-23 16:42:02)


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

#602 2016-02-23 16:57:52

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

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

Everything works here as well.
Could you give me your full WUnderground address?


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

#603 2016-02-23 19:11:57

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

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

@loutch ( & @Teo )

I took your 2b script, created /home/sector11/2b_Wunderground_API/2b_loutch (mine is at /media/5/Conky2b_Wunderground_API/) and used my API key in it.

I then copied the images directories over as well - and ran it.

- it did NOT create the Moon_phase.png  sad

 23 Feb 16 @ 16:18:26 ~/2b_Wunderground_API
  $ dir
2b  2b_loutch  2b_README-INFO  Forecast_Images	moonicons
 
 23 Feb 16 @ 16:18:31 ~/2b_Wunderground_API
  $ bash 2b_loutch
rm: cannot remove ‘/home/sector11/2b_Wunderground_API/*.png’: No such file or directory
wget: no process found
--2016-02-23 16:18:41--  http://api.wunderground.com/api/6dca5dfaa2cddbc1/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json
Resolving api.wunderground.com (api.wunderground.com)... 104.79.241.115
Connecting to api.wunderground.com (api.wunderground.com)|104.79.241.115|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘/home/sector11/2b_Wunderground_API/raw_data’

/home/sector11/2b_Wundergro     [ <=>                                          ]  67.62K   444KB/s   in 0.2s   

2016-02-23 16:18:41 (444 KB/s) - ‘/home/sector11/2b_Wunderground_API/raw_data’ saved [69239]

 
 23 Feb 16 @ 16:18:42 ~/2b_Wunderground_API
  $ dir
2b		d3.png	  Forecast_Images  h17.png  h24.png  h31.png  h5.png	 n10.png  n8.png
2b_loutch	d4.png	  h10.png	   h18.png  h25.png  h32.png  h6.png	 n1.png   n9.png
2b_README-INFO	d5.png	  h11.png	   h19.png  h26.png  h33.png  h7.png	 n2.png   Now.png
Conditions	d6.png	  h12.png	   h1.png   h27.png  h34.png  h8.png	 n3.png   raw_data
Conditions-fr	d7.png	  h13.png	   h20.png  h28.png  h35.png  h9.png	 n4.png   Simple_Forecast
d10.png		d8.png	  h14.png	   h21.png  h29.png  h36.png  Hourly	 n5.png
d1.png		d9.png	  h15.png	   h22.png  h2.png   h3.png   moonicons  n6.png
d2.png		Forecast  h16.png	   h23.png  h30.png  h4.png   Moon_Sun	 n7.png
 
 23 Feb 16 @ 16:18:46 ~/2b_Wunderground_API
  $ 

Copied my 2b script over and changed the path's to reflect /home/sector11/ and after deleting the files your 2b_loutch script created, I ran it.

- it created the Moon_phase.png

 23 Feb 16 @ 16:19:45 ~/2b_Wunderground_API
  $ dir
2b  2b_loutch  2b_README-INFO  Forecast_Images	moonicons
 
 23 Feb 16 @ 16:20:28 ~/2b_Wunderground_API
  $ bash 2b
rm: cannot remove ‘/home/sector11/2b_Wunderground_API/*.png’: No such file or directory
wget: no process found
--2016-02-23 16:20:35--  http://api.wunderground.com/api/6dca5dfaa2cddbc1/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json
Resolving api.wunderground.com (api.wunderground.com)... 104.73.35.107
Connecting to api.wunderground.com (api.wunderground.com)|104.73.35.107|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘/home/sector11/2b_Wunderground_API/raw_data’

/home/sector11/2b_Wundergro     [  <=>                                         ]  67.62K   252KB/s   in 0.3s   

2016-02-23 16:20:36 (252 KB/s) - ‘/home/sector11/2b_Wunderground_API/raw_data’ saved [69239]

 
 23 Feb 16 @ 16:20:36 ~/2b_Wunderground_API
  $ dir
2b		d4.png	  Forecast_Images  h17.png  h24.png  h31.png  h5.png	      Moon_Sun	n7.png
2b_loutch	d5.png	  h10.png	   h18.png  h25.png  h32.png  h6.png	      n10.png	n8.png
2b_README-INFO	d6.png	  h11.png	   h19.png  h26.png  h33.png  h7.png	      n1.png	n9.png
Conditions	d7.png	  h12.png	   h1.png   h27.png  h34.png  h8.png	      n2.png	Now.png
d10.png		d8.png	  h13.png	   h20.png  h28.png  h35.png  h9.png	      n3.png	raw_data
d1.png		d9.png	  h14.png	   h21.png  h29.png  h36.png  Hourly	      n4.png	Simple_Forecast
d2.png		fetched   h15.png	   h22.png  h2.png   h3.png   moonicons       n5.png
d3.png		Forecast  h16.png	   h23.png  h30.png  h4.png   Moon_phase.png  n6.png
 
 23 Feb 16 @ 16:20:40 ~/2b_Wunderground_API
  $ 

My conclusion:  You modified something in the 2b script (for the French Language maybe) that has interfered with the creating of the Moon_phase.png image.

BTW:  Both /home/sector11/2b_Wunderground_API/2b and /home/sector11/2b_Wunderground_API/2b_loutch used:

address="http://api.wunderground.com/api/xxxxxxxxxxxxxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json"

... with my proper API key.

sad


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#604 2016-02-23 20:01:36

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

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

Sector11 wrote:

@unklar - I don't see the Moon_phase.png in your listing.

Sorry @Sector11, I had only Moon_Sun
seen.
Here is the correct from now:  OqIhoAbh

[unklar@localhost 2b_Wunderground_API]$ dir
10_day_5hour_falldown_260x1075.jpg          Forecast
2b                                          Forecast_Images
2b_README-INFO                              h18.png
2b_wun_Conditions.companion.conky           h32.png
2b_wun_Conditions.companion.conky.old       h4.png
2b_wun_Forecast.companion.conky             Hourly
2b_wun_Forecast.companion.conky.old         moonicons
2b_wun_Moon_Sun.companion.conky             Moon_phase.png
2b_wun_Moon_Sun.companion.conky.bak         Moon_Sun
2b_wun_Simple_Forecast.companion.conky      n10.png
2b_wun_Simple_Forecast.companion.conky.old  n1.png
Conditions                                  n2.png
d10.png                                     n3.png
d1.png                                      n4.png
d2.png                                      n5.png
d3.png                                      n6.png
d4.png                                      n7.png
d5.png                                      n8.png
d6.png                                      n9.png
d7.png                                      Now.png
d8.png                                      raw_data
d9.png                                      Simple_Forecast

Whether it is loutch to the same problem is in French?
https://forums.bunsenlabs.org/viewtopic … 496#p12496

Last edited by unklar (2016-02-23 20:16:50)

Offline

#605 2016-02-23 22:12:32

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

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

^ btw
now I've found:
I call the page so on

..satellite/alerts/lang:DL/q/pws:ILICHTEN11.json"   < many mistakes in conky

28 files created (with the Moon_phase.png)

I call the page so on

..satellite/q/DL/pws:ILICHTEN11.json"   < no error in conky

are created (no Moon_phase.png) as with you 63 files.  sad 8o

Offline

#606 2016-02-24 09:47:39

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

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

Hello

i extract from the pack a new 2b file wihthout my french translation put in mine adress and with this new file

i have no Moon_phase.png to.

When i create for the first time this conky i used the same adress and the Moon_Sun.png was created and now nothing probably has the site changed anything no?

@+

Last edited by loutch (2016-02-24 12:38:11)


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

#607 2016-02-24 12:34:15

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

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

hello

i found it in the Moon_Sun there was "Full" instead of "Full Moon"

i ad this line in forecast Moon_Sun and i have now Moon_phase.png

elif [[ $moon_phase == "Full" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"13.png" $HOME/2b_Wunderground_API/Moon_phase.png


@+

Last edited by loutch (2016-02-24 12:34:52)


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

#608 2016-02-24 13:22:14

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

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

@loutch
I can confirm.
"Full" but is wrong.
Now would be displayed "Waning Gibbous" will   wink

Offline

#609 2016-02-24 14:32:51

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

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

unklar wrote:

@loutch
I can confirm.
"Full" but is wrong.
Now would be displayed "Waning Gibbous" will   wink


Haaaaaaaa  by me at the wunderground page at Sun&Moon i have "pleine lune" = Full Moon like this



1456324328.png


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

#610 2016-02-24 15:54:20

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

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

It's great y just have an update an the conky have change to "gibeuse décroissante" in english "Waning Gibbous"

the moonphase.png have changed to it's ok

@+


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

#611 2016-02-24 16:30:12

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

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

Is everything OK now?


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

#612 2016-02-24 16:44:52

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

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

TeoBigusGeekus wrote:

Is everything OK now?


Yes everything is ok , the conky work great .

Wunderground has of to make late the updates.

@+


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

#613 2016-02-24 16:46:33

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

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

Happens from time to time, don't worry too much about it.
Glad you've sorted it out.


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

#614 2016-02-24 16:56:44

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

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

ok

Tank you again for your help 

@+


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

#615 2016-02-24 17:59:59

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

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

@loutch; @Teo,

thank you for the information.
Also with me everything is ok again!  big_smile
29G4PJR6

Offline

#616 2016-02-24 18:41:34

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

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

@ unklar

Mageia 5 KDE the best  big_smile  big_smile

1456339414.png


@+

Last edited by loutch (2016-02-24 18:44:11)


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

#617 2016-02-24 18:50: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)

I didn't do anything, thank unklar and S11.


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

#618 2016-02-24 19:44:07

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

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

@Teo,

has your address here also no problem.

[unklar@localhost ~]$ 
Conky: desktop window (2600113) is subwindow of root window (9e)
Conky: window type - normal
Conky: drawing to created window (0x4600001)
Conky: drawing to double buffer
wget: Kein Prozess gefunden
--2016-02-24 20:29:50--  http://api.wunderground.com/api/xxxxxxxxxxxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/Greece/kastoria.json
Auflösen des Hostnamen »api.wunderground.com (api.wunderground.com)«... 104.85.248.66
Verbindungsaufbau zu api.wunderground.com (api.wunderground.com)|104.85.248.66|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: nicht spezifiziert [application/json]
In »»/home/unklar/2b_Wunderground_API/raw_data«« speichern.

    [ <=>                                                          ] 68.366      --.-K/s   in 0,06s   

2016-02-24 20:29:51 (1,13 MB/s) - »/home/unklar/2b_Wunderground_API/raw_data« gespeichert [68366]
                                                                            

Everything OK!   wink

@loutch,

+1    big_smile

Offline

#619 2016-02-24 19:52:15

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

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

Unless I miss something, everything works OK unklar:

zyf4OFgt.jpg


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

#620 2016-02-24 21:11:07

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

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

Then I am reassured, my friend.   O:)

Offline

Board footer

Powered by FluxBB