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.
Aha! I was just testing to see if you guys actually read the guide. I didn't really forget to put that in. It was completely intentional! :eek: ...Honest!

Thanks Cody! :D

Your geeklet looks great! I'm quite jealous about your weather!
 
heres my first geek tool desktop thingy, i dont know what call it yet hahaha.
today was my first day using it so its not the best
2renyg0.png
 
Aha! I was just testing to see if you guys actually read the guide. I didn't really forget to put that in. It was completely intentional! :eek: ...Honest!

Thanks Cody! :D

Your geeklet looks great! I'm quite jealous about your weather!

It's a far cry from the ice we've had in the past weeks!

I kept reading the guide thinking "I must be missing it!" Appreciate the effort to put together the guide - this is much better than the simple time & date I just had thrown up on my desktop.
:D
 
The guide was really no problem. Getting the geeklet to look right kept me up all night last! :p

I'm really pleased with the way it all turned out but I swear I'm not opening up Photoshop again for at least a month!
 
Anyone know how to just print that?

not sure is what you want, try this:
Code:
curl --silent "http://weather.yahoo.com/england/county-durham/stockton-on-tees-36191/" | grep -e "<li><strong>Tomorrow:</strong>" -A 1 | tail -n 1
 
not sure is what you want, try this:
Code:
curl --silent "http://weather.yahoo.com/england/county-durham/stockton-on-tees-36191/" | grep -e "<li><strong>Tomorrow:</strong>" -A 1 | tail -n 1

I've been trying all day to do that :D:D

Works perfect, thanks a lot!
 
Hey guys. So I've been trying to figure this out all day, but can't seem to get it right. Does anyone have any idea how it might be possible to use just the Hi-Lo temperature for the days weather. The data is there on Yahoo weather, I just can't seem to extract it
 
not sure is what you want, try this:
Code:
curl --silent "http://weather.yahoo.com/england/county-durham/stockton-on-tees-36191/" | grep -e "<li><strong>Tomorrow:</strong>" -A 1 | tail -n 1

What about for the day after tomorrow?
 
What about for the day after tomorrow?

Just change the "Tomorrow:" in his script to "Day after Tomorrow:" (making sure that's exactly quoted from the Yahoo Weather site, I didn't go double-check), and it'll print those conditions instead. I changed it to show Today instead of Tomorrow.

jW
 
Does anyone have any idea how it might be possible to use just the Hi-Lo temperature for the days weather.
what do you want to do precisely? i don't understand...

What about for the day after tomorrow?

Just change the "Tomorrow:" in his script to "Day after Tomorrow:" (making sure that's exactly quoted from the Yahoo Weather site, I didn't go double-check), and it'll print those conditions instead. I changed it to show Today instead of Tomorrow.

not properly... Yahoo! Weather RSS links only give you today and tomorrow forecasts, if you want further days forecasts there are two options: 1) searching for another weater service ; 2) parsing the main weather page html code... :)eek:).
the first option is obvioulsy the best one and I remember that someone posted sometime a multi day forecast... hey you? we're knocking at your door!
 
what do you want to do precisely? i don't understand...

Trying to extract this info..
screenshot20100114at131.png


So I can do this with it...
screenshot20100114at134.png


The Forecast script shows the highs and lows for the next day along with weather conditions. I'm just trying to get the high low temperatures for today without the weather conditions.

Any ideas?
 
the weather icon baffles me...
this is the URL
Code:
http://xml.weather.yahoo.com/forecastrss?p=SNXX0006&u=c

this is the content
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<channel>

<title>Yahoo! Weather - Singapore, SN</title>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Singapore__SN/*http://weather.yahoo.com/forecast/SNXX0006_c.html</link>
<description>Yahoo! Weather for Singapore, SN</description>
<language>en-us</language>
<lastBuildDate>Thu, 14 Jan 2010 10:00 am SGT</lastBuildDate>
<ttl>60</ttl>
<yweather:location city="Singapore" region=""   country="SN"/>

<yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/>
<yweather:wind chill="28"   direction="10"   speed="9.66" />
<yweather:atmosphere humidity="84"  visibility="9.99"  pressure="982.05"  rising="0" />
<yweather:astronomy sunrise="7:11 am"   sunset="7:14 pm"/>
<image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>
<url>http://l.yimg.com/a/i/us/nws/th/main_142b.gif</url>
</image>
<item>

<title>Conditions for Singapore, SN at 10:00 am SGT</title>
<geo:lat>1.37</geo:lat>
<geo:long>103.98</geo:long>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Singapore__SN/*http://weather.yahoo.com/forecast/SNXX0006_c.html</link>
<pubDate>Thu, 14 Jan 2010 10:00 am SGT</pubDate>
<yweather:condition  text="Mostly Cloudy"  code="28"  temp="28"  date="Thu, 14 Jan 2010 10:00 am SGT" />
<description><![CDATA[
<img src="http://l.yimg.com/a/i/us/we/52/28.gif"/><br />
<b>Current Conditions:</b><br />
Mostly Cloudy, 28 C<BR />
<BR /><b>Forecast:</b><BR />
Thu - Scattered Thunderstorms. High: 30 Low: 24<br />
Fri - Scattered Thunderstorms. High: 31 Low: 24<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Singapore__SN/*http://weather.yahoo.com/forecast/SNXX0006_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>
]]></description>
<yweather:forecast day="Thu" date="14 Jan 2010" low="24" high="30" text="Scattered Thunderstorms" code="38" />
<yweather:forecast day="Fri" date="15 Jan 2010" low="24" high="31" text="Scattered Thunderstorms" code="38" />
<guid isPermaLink="false">SNXX0006_2010_01_14_10_00_SGT</guid>
</item>

</channel>
</rss><!-- api7.weather.re4.yahoo.com uncompressed Wed Jan 13 18:59:35 PST 2010 -->

and this is the script to get the icon
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=SNXX0006&u=c/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\

i'm getting nothing..
when i tried to trace..
the content of the RSS has no word "forecast-icon" to grep..
so it get's nothing..
and the subsequent piped command will produce nothing also..

what am i missing here?


edit:
nevermind.. already fixed it..
what i did was when the script tries to grep "forecast-icon", i grep-ed "forecast" instead, and piped it to another grep for ".gif"
after that, all the rest needs to be changed..
i basically stripped the line of xml notations using sed..
just basic substitution..
s "sed/<br>//"
obviously not the best way to go.. but on my case.. it worked..
 
Hey jck1634

Im sorry to sound like a newbie at this but I am so please bear with me.

How do I get the shells to go onto the HTC geektool that you are using? I can not figure out how to make them go on there.

If you could please help me out with this it would be great thanks!
 
Hey jck1634

Im sorry to sound like a newbie at this but I am so please bear with me.

How do I get the shells to go onto the HTC geektool that you are using? I can not figure out how to make them go on there.

If you could please help me out with this it would be great thanks!

it's not actually "on" the "HTC Geektool"..
basically what you call "HTC Geektool" is just an image..
u place it anywhere u like..
and i create alot of other widget with shell commands.. and u arrange them to that they "look" like they are actually "on" the "HTC Geektool"

get the idea?
 
it's not actually "on" the "HTC Geektool"..
basically what you call "HTC Geektool" is just an image..
u place it anywhere u like..
and i create alot of other widget with shell commands.. and u arrange them to that they "look" like they are actually "on" the "HTC Geektool"

get the idea?

Thank you for trying to shed some light on this for me. When I was making the time shell and the date shell I wasn't able to get it onto of the HTC logo.

Or do I need to make all the shells first and then place the HTC logo over it and then it will work.

Sorry if I sound dumb i'm just trying to figure this out and for some reason I can't make it work.

Thank you for all the Help!
 
So I can do this with it...
screenshot20100114at134.png


The Forecast script shows the highs and lows for the next day along with weather conditions. I'm just trying to get the high low temperatures for today without the weather conditions.

Any ideas?

i think it's actually 2 different widget..
one for the Hi.. one for the Lo..
how comfortable are you on shell scripting?
for the Hi..
curl the rss..
grep for "Forecast", grep for "High", why double grep? to make sure u get the correct line..
use sed to strip off all OTHER characters before the word "High"
use sed again to strip off all OTHER characters After <space>Low
this way will leave you with "High: 28 Low"
now.. use sed again to remove characters "High:" and "Low"
sed "s/High://"
sed "s/Low//"
it will leave you with " 28 "
now.. again.. sed "s/ //" to remove spaces

well probably not the best way.. again.. but it's easier to follow...

now that you've got the idea.. to the similar thing for the Lo Temp..
but i need to remind you..
Hi and Lo and for forecast only..
meaning, that it's for tomorrow and the day after..
NOT for today..
 
Thank you for trying to shed some light on this for me. When I was making the time shell and the date shell I wasn't able to get it onto of the HTC logo.

Or do I need to make all the shells first and then place the HTC logo over it and then it will work.

Sorry if I sound dumb i'm just trying to figure this out and for some reason I can't make it work.

Thank you for all the Help!

no problem..
but u get the idea right?

what do u mean when u say
I wasn't able to get it onto of the HTC logo.

the HTC logo is not actually anything.. not a widget.. not a container for some shells.. just an image..
that's it..
you put the shells on top of it.. in the right position.. to make it "looks" like it's a container..or a widget..
it's all just positioning..
put the shells for Hours right on the spot.. adjust the color and font..
and do the same thing for the rest..

edit:
oohh i just got what you mean..
yes.. the HTC logo is just an image.. nothing else..
you create ANOTHER widgets.. each for hour, minutes, city, etc.. and then you out it on top of the image..
it's not actually one widget..
all are separate widgets..
just happens to stack with the right effect to give the idea that it's a complete widget..
 
Thanks p01ntbl4nk for clearing these up for me. Both my problem and the other persons problem.

Unfortunately I'm more uncomfortable with shell scripting than I would be with full frontal nudity in a public place. So I think I'm going to leave that as it is! Unless anyone can suggest an easier way of displaying the days hi and lo weather temperature?

@Jord1985 as p01ntbl4nk said, the HTC .png that you would have downloaded is just an images you place on your desktop through geektool. Much in the same way you would drag a shell command out on to the desktop then write in the script for your command.

For the HTC background image, you drag out the image icon onto your desktop from the geektool preference pane and then specify in the box the location of the imagewithin your computer. The same goes for the separator. With the separator, you need to overlay it over both numbers so you need to drag out two image icons for it and specify the same location.

I'll update the guide to hopefully make this clearer.

EDIT. I've also changed the code for the temperature to go from this...
screenshot20100114at823.png
to this..
screenshot20100114at822.png
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.