You are not logged in.
Waning gibbous today and 2b works fine.
Happy holidays everybody, I'm in a 'hibernate' mode at the moment...
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
^ Yup here too, but 10 Jan 2016 will be the big test.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Hey, nice eye Inodoro.
Does this mean that 'New Moon' should also be 'New'? Have they changed the Moon messages?
It needs some monitoring for a while...
Thank you Teo. Feels nice to be useful, once in a while... {)
I think so. I'm waiting for the moon to change, to be sure. In any case, it's just a small change on line 226 of the script, nothing serious...
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
Thank you Teo. Feels nice to be useful, once in a while... {)
![]()
I think so. I'm waiting for the moon to change, to be sure. In any case, it's just a small change on line 226 of the script, nothing serious...
I've replaced the check for 'Full Moon' and 'New Moon' with regular expressions that should work for both 'Full', 'New' and 'Full Moon', 'New Moon'.
#!/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/a7f118ad23b2d3b9/conditions/forecast10day/astronomy/hourly/satellite/q/Greece/kastoria.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.* ]]; then
cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"24.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase =~ Full.* ]]; then
cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"13.png" $HOME/2b_Wunderground_API/Moon_phase.png
fi
killall -CONT conky
Notice the last 2 elifs.
What's left, is to test it to see if the other phases hide any more surprises...
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
@fvirgola80
Stand by.
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
Notice the last 2 elifs.
What's left, is to test it to see if the other phases hide any more surprises...
Nice. I'll change mine.
I don't think the other phases will give any trouble. The problem with the full moon is that, while the script was looking for "Full Moon" in the Moon_Sun file, the file only showed "Full". That's why I suspect we'd have the same problem with the new moon. But on the other phases there's no discrepancy between what's on the text file, and what the script will look for.
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
TeoBigusGeekus wrote:Notice the last 2 elifs.
What's left, is to test it to see if the other phases hide any more surprises...
Nice. I'll change mine.
![]()
I don't think the other phases will give any trouble. The problem with the full moon is that, while the script was looking for "Full Moon" in the Moon_Sun file, the file only showed "Full". That's why I suspect we'd have the same problem with the new moon. But on the other phases there's no discrepancy between what's on the text file, and what the script will look for.
That's what I think too, but to be 100% sure I won't rebundle the script till all the phases have been tested.
Thanks again for the feedback Inodoro!
Last edited by TeoBigusGeekus (2015-12-28 21:59:57)
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
Thanks again for the feedback Inodoro!
Glad I could help.
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
Ok, new question: I have the wunderground API. Now, as it is, the API sends me the data from a station that's giving some extreme numbers, which are not realistic where I live.
Can I change the weather station in my API, or do I have to sign up for a new key?
Thanks in advance.
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
You can change the station to anything that Wunderground has ... no new key needed.
samples:
#address="http://api.wunderground.com/api/APICODE/conditions/forecast10day/astronomy/hourly/satellite/q/pws:ICIUDADA11.json"
address="http://api.wunderground.com/api/APICODE/conditions/forecast10day/astronomy/hourly/satellite/q/pws:ICIUDADA6.json"
#http://www.wunderground.com/cgi-bin/findweather/getForecast?query=-34.603298,-58.381599&sp=ICIUDADA6
#http://www.wunderground.com/cgi-bin/findweather/getForecast?query=Buenos+Aires%2C+Argentina
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Thank you S11, worked perfectly!
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
@fvirgola80
Stand by.
Good morning to all that interesting news for the phases of the moon monthly about the script we are TEO? Sector11 how are you?
By Luke
Nothing happens by chance
Offline
Good stuff IP. Glad to help.
Good morning fvirgola80 ... off to a normal start but HOT!. Had a bunch of micro-cuts from my ISP yesterday. Really annoying until it was fixed by losing power entirely.
08:30 and already the heat index is at 31° - pressure at 1009 and humidity at 73% - going to be another hell-on-earth day.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Patience Luke, patience.
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
^ Please, Teo, send me some 'cold', I want to hibernate too.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
08:30 and already the heat index is at 31° - pressure at 1009 and humidity at 73% - going to be another hell-on-earth day.
Heat? In Buenos Aires?
Whatcha talkin' 'bout, Willis?
Imagination is intelligence having fun. (Albert Einstein)
The thing about the Internet is you can create a phrase, and make up its author, and everybody will fall for it. (Aristotle)
Offline
AHHHHHHHHHHHHHHHHH SHUDDUP!
Not all of us live to bathe in lava. ]:D ]:D
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
TeoBigusGeekus wrote:@fvirgola80
Stand by.
Good morning to all that interesting news for the phases of the moon monthly about the script we are TEO? Sector11 how are you?
By Luke
Sorry fvirgola80, but I looked briefly on the webpage's source code and I have bad news: Java Script.
I'm not touching this...
If you have a different site with monthly moon info please post it.
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
I have a couple ... looks like tables with images. Found a few that were obvious java as well.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Hello guys , I saw the post ... what a disappointment ..... TEO and the sites that you have dimensioned Sector11 not good right? .... See this
http://www.moonconnection.com/moon_phas … ndar.phtml
https://stardate.org/nightsky/moon
http://www.moon-phases.net/
Nothing happens by chance
Offline