Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
The third beta for the Ultimate Weather Script has arrived for everyone to test!

See this post for the current features. I have been updating this list with what works and what does not work.

Here is the link to the download:
http://xtacocorex-geektool-scripts.googlecode.com/files/ultimateweather_beta03.tar

Please read the README file inside the tarball, it explains everything and provides sample commands for you to pick from and modify.

This is a multi-file script, please keep everything inside the directory when extracted.

If you have no idea how to deal with a .tar file, just double click the file inside of Finder to extract. I am unable to upload .zip files to my Google Code site.

----------



Well no worries, because the third beta of the Ultimate Weather script is here! (see post above)


I'm struggling to get the weather images to display using weather underground for Leeds in the UK - I've added a image geektool box and pasted the following in

file://localhost/tmp/wunderground_current_wx.gif

but no image is displayed - where am I going wrong?
 
I'm struggling to get the weather images to display using weather underground for Leeds in the UK - I've added a image geektool box and pasted the following in

file://localhost/tmp/wunderground_current_wx.gif

but no image is displayed - where am I going wrong?

That should be it, it works on my system. I did feed in the Leeds url for wunderground and saw that it was raining.

What happens when you open up Terminal.app and run the following command?
Code:
ls /tmp *.gif
 
Excellent! How hard was it to get the script setup? Do I need to change anything in my README?

I think it just needs a little more clarity around the naming of the gif and other image files. - perhaps include the terminal command as well to check the naming of the files?


On a separate note is it possible to use apples weather forecast and icons (i.e. the ones on the iPhone?) or perhaps the BBC ones for us UK users?

I must say though I'm very impressed with the script itself :)
 
This one works for me:

TZ=India/GMT-13 date +"Chennai:%l:%M %p on %d %B" :)

----------

TZ=India/GMT-13 date +"Chennai:%l:%M %p on %d %B":)

I had no luck in finding the suitable script for chennai (India) local time.

it's GMT +5:30 hours

any one plz help

I tried in may ways like
TZ=England/GMT+5.5 date +"London: %I:%M %p - %D",

but none of them worked out. :mad:
 
I think it just needs a little more clarity around the naming of the gif and other image files. - perhaps include the terminal command as well to check the naming of the files?


On a separate note is it possible to use apples weather forecast and icons (i.e. the ones on the iPhone?) or perhaps the BBC ones for us UK users?

I must say though I'm very impressed with the script itself :)

Got busy with actual work stuff among wrangling two kids, so I haven't had much time to work on the script. Once I finish the AccuWeather stuff, I'll start on parsing the BBC's weather.
 
i have a quick question. I am trying to make it so I only have to change one line to change every other line in terms of my directory I want to set.

Basically, I just want to define a filepath a variable that I can easily change (so I don't have to go through and change the path in all 20 lines every single time)!

Here is the code:

Code:
set conditions to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -c"
set currentTime to hours of (current date)
set temp to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -t -d"

set the folderPath to "/Users/Zach/Documents/Google Drive/Customize/GeekTool"
set the filePath to "/WeatherIcons/clearday.png"
set the fullPath to folderPath & filePath
set the partialPath to "Users/Zach/Documents/Google Drive/Customize/GeekTool/temp"

# Nice Weather * * * * * * * * * * * * * * * * * * *
if conditions is "Fair" then
	if currentTime is in {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} then
		do shell script "cp fullPath partialPath"
		do shell script "mv -f /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/clearday.png /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/WeatherIcon.png"
	else

However, do shell script "cp fullPath partialPath" is not working. Can someone help me? The error its giving me is:
cp: fullPath: No such file or directory
 
i have a quick question. I am trying to make it so I only have to change one line to change every other line in terms of my directory I want to set.

Basically, I just want to define a filepath a variable that I can easily change (so I don't have to go through and change the path in all 20 lines every single time)!

Here is the code:

Code:
set conditions to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -c"
set currentTime to hours of (current date)
set temp to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -t -d"

set the folderPath to "/Users/Zach/Documents/Google Drive/Customize/GeekTool"
set the filePath to "/WeatherIcons/clearday.png"
set the fullPath to folderPath & filePath
set the partialPath to "Users/Zach/Documents/Google Drive/Customize/GeekTool/temp"

# Nice Weather * * * * * * * * * * * * * * * * * * *
if conditions is "Fair" then
	if currentTime is in {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} then
		do shell script "cp fullPath partialPath"
		do shell script "mv -f /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/clearday.png /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/WeatherIcon.png"
	else

However, do shell script "cp fullPath partialPath" is not working. Can someone help me? The error its giving me is:

It's because you're trying to use Applescript variables in a bash shell command. The shell script is looking for the files called fullPath and partialPath, but they aren't there.

I don't know how to get Applescript to set up a proper shell script, but if you were to do this in Bash, you'd have to put a $ in front of the variables.

If you use my new Ultimate Weather Script, it downloads the weather images automatically for you...
 
Where are you sourcing the png ? ... and all you want to do is display a different png depending upon the day of the week ?

the png is sourced out of a folder on my hd. and yes that is all i want to do haha, i just havent quite gotten the hang of writing geektool code
 
Calendar with Geek Tool

Ok I have been using GeekTool for a few days now and I have a question about the calendar option. I really like the font that I am using on my desktop (see screen shot) but the days don't line up. Is there a way to get them to line up and maybe make the day of the week bold? Can someone help me out?
Also I am in the Army and stationed in Korea and am having trouble getting the right script for my current weather location. The info is for Seoul which is about two hours away. Any help on that one as well?
 

Attachments

  • Screen Shot 2012-05-09 at 4.58.53 PM.png
    Screen Shot 2012-05-09 at 4.58.53 PM.png
    2.1 MB · Views: 279
i have a quick question. I am trying to make it so I only have to change one line to change every other line in terms of my directory I want to set.

Basically, I just want to define a filepath a variable that I can easily change (so I don't have to go through and change the path in all 20 lines every single time)!

Here is the code:

Code:
set conditions to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -c"
set currentTime to hours of (current date)
set temp to do shell script "python '/Users/Zach/Documents/Google Drive/Customize/GeekTool/weather.py' -t -d"

set the folderPath to "/Users/Zach/Documents/Google Drive/Customize/GeekTool"
set the filePath to "/WeatherIcons/clearday.png"
set the fullPath to folderPath & filePath
set the partialPath to "Users/Zach/Documents/Google Drive/Customize/GeekTool/temp"

# Nice Weather * * * * * * * * * * * * * * * * * * *
if conditions is "Fair" then
	if currentTime is in {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} then
		do shell script "cp fullPath partialPath"
		do shell script "mv -f /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/clearday.png /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/WeatherIcon.png"
	else

However, do shell script "cp fullPath partialPath" is not working. Can someone help me? The error its giving me is:

You can use any applescript variable you want in a "do shell script" but you have to honor how they are referenced.

Code:
do shell script "cp fullPath partialPath"
do shell script "mv -f /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/clearday.png /Users/Zach/Documents/Google Drive/Customize/GeekTool/temp/WeatherIcon.png"

becomes ...

Code:
do shell script ("cp " & fullPath & partialPath)
do shell script ("mv -f " & partialPath & "/clearday.png" & paritalPath & "/WeatherIcon.png")

Hope this helps.
 
Ok I have been using GeekTool for a few days now and I have a question about the calendar option. I really like the font that I am using on my desktop (see screen shot) but the days don't line up. Is there a way to get them to line up and maybe make the day of the week bold? Can someone help me out?
Also I am in the Army and stationed in Korea and am having trouble getting the right script for my current weather location. The info is for Seoul which is about two hours away. Any help on that one as well?

Which weather script are you running? If it's my Ultimate Weather Script, you can hard code your location into the script and have it pull the proper weather. If it is my script and you're running into issue, PM me with the script command and I'll see what I can figure out for you.
 
Which weather script are you running? If it's my Ultimate Weather Script, you can hard code your location into the script and have it pull the proper weather. If it is my script and you're running into issue, PM me with the script command and I'll see what I can figure out for you.

No it's not your Ultimate weather script. I went on YouTube and watched numerous videos on how to install a good weather script. But haven't found one that works. I am using the Yahoo weather page but it doesn't have my location there. Do you have a suggestion or reccomendation for me? Let me know.
 
I've been using this weather script for some time now -

curl --silent "http://weather.yahooapis.com/forecastrss?p=USNY0996&u=f'" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

But how can I add images to it? To show the cloud/sun/rain etc?
 
Weather Image Broken

Seems like with the last software update it has broken the script for the yahoo weather image. Was working fine until I updated, anyone have any ideas?
 
I've been using this weather script for some time now -

curl --silent "http://weather.yahooapis.com/forecastrss?p=USNY0996&u=f'" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

But how can I add images to it? To show the cloud/sun/rain etc?

You can use my Ultimate Weather Script with the following command:
Code:
python ~/Documents/Geektool/ultimateweather/ultimate_weather_parser.py -A -L ipinfodb -Q full -T yahoo -e current -s simple

The current weather image will be downloaded to /tmp, create an image geeklet pointing to /tmp/yahoo_current_wx.gif

Seems like with the last software update it has broken the script for the yahoo weather image. Was working fine until I updated, anyone have any ideas?

Try my Ultimate Weather Script, it supports other sites besides Yahoo.
 
I wrote a similar api service of gtwthr.com. Currently, I have few users that are using it and I am slowly improving the code (converting to a tiny mvc framework). When it is done I will release it on github. In the meantime the service is online on my website. Comments and criticism appreciated :)

Note, do not spread this service outside macrumors.com due to data traffic of my host :p
 
help?

xtacocorex, thanks for making the weather script. i was wondering if you (or someone else) would be able to help me. i'm not quite understanding what i'm supposed to do. i want to get the simple forecast and current image on wunderground for zipcode 10013. can anyone point me in the right direction of what i'm supposed to do?
 
Thanks to xtacocorex. Scripts seems to work but the images looks crappy.
The .gif image from yahoo was way worse then the original one. Doesnt even have a transparent background.
Is that supposed to be so?
 
xtacocorex, thanks for making the weather script. i was wondering if you (or someone else) would be able to help me. i'm not quite understanding what i'm supposed to do. i want to get the simple forecast and current image on wunderground for zipcode 10013. can anyone point me in the right direction of what i'm supposed to do?

The script will automatically grab your location, so you shouldn't need to feed in your location unless what ipinfodb grabs something way off base.

Here is what I'm running for Wunderground:
Code:
python ~/Documents/GeekTool/ultimateweather/ultimate_weather_parser.py -A -L ipinfodb -Q full -H -T wunderground -g current -s simple

If you need to specify a location, use the following and replace everything in {} (including the braces) with the required info:
Code:
python ~/Documents/GeekTool/ultimateweather/ultimate_weather_parser.py -B -Q full -H -T wunderground -g current -s simple -C {city} -S {state} -O {country} -Z 10013


----------

Thanks to xtacocorex. Scripts seems to work but the images looks crappy.
The .gif image from yahoo was way worse then the original one. Doesnt even have a transparent background.
Is that supposed to be so?

I haven't been using the Yahoo images, but I thought they were transparent (I did look to make sure I was having the script download the proper file when I tested the code). I'm planning on getting support for external images, but it's going to be a pain to implement. I also haven't had time to work on the script lately due to the full time job.

The Wunderground images aren't that great either, but I took my image geeklet and made them translucent by sliding the opacity to what looked decent.
 
Had Geektool for about 3 days now, been playing about with it and so far come up with this (the background photos are my own; which change every hour or so or when you open up a new desktop space thing)

Screen%20Shot%202012-05-13%20at%2006.56.28.png

When iTunes is closed

Screen%20Shot%202012-05-13%20at%2006.57.55.png

When iTunes is open but not playing

Screen%20Shot%202012-05-13%20at%2007.07.34.png

When music is playing

Any suggestions?

Nb: I've been trying to get the weather picture working but Yahoo! have redesigned their website recently, and current scripts don't seem to be working...
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.