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.
Any ideas?

in fact i was thinking the same solution to preserve space in HTC template, this shoud work:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -/]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/"

the following variant keeps the three-chars day indication suffix:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/- [A-Z a-z /]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?- H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/"
 
Thanks poppero!

The first one is perfect, except it's still showing the forecast for tomorrow, including the three char day suffix. Is there anyway to either remove the forecast for tomorrow or at the very least remove everything and leaving just the temperatures?
 
Thanks poppero!

The first one is perfect, except it's still showing the forecast for tomorrow, including the three char day suffix. Is there anyway to either remove the forecast for tomorrow or at the very least remove everything and leaving just the temperatures?

Here you go:

Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITYCODE&u=f" | grep -e "Forecast:" -A 1 | tail -n 1 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/"

Or... if you'd like it on two lines, like the image above:

Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITYCODE&u=f" | grep -e "Forecast:" -A 1 | tail -n 1 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/H\: \1\?L\:\ \2/" | tr "?" "\n"

Again - replace YOURCITYCODE with your city code and "f" with "c" if needed.
:D

I'll admit that I didn't really read through the html pull and just edited the needed parts - it can likely be tidied up a good bit.
 
Is there anyway to either remove the forecast for tomorrow or at the very least remove everything and leaving just the temperatures?

today only, NO three chars day suffix:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -/]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/" | head -n 1

today only, NO three chars day suffix, no H and L indicators:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -/]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?\1\ \ \2/" | sed "s/\?\(.*\)/\\1/" | head -n 1

today only, YES three chars day suffix:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/- [A-Z a-z /]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?- H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/" | head -n 1

today only, YES three chars day suffix, no H and L indicators:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/- [A-Z a-z /]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\?- \1\  \2/" | sed "s/\?\(.*\)/\\1/" | head -n 1
 
Thanks Cody and Poppero!

I was able to modify Cody's code a little and I think I've cracked it!

This is the HTC Sense UI (the effect I was going for)
screenshot20100114at401.png


And this is what I have now
screenshot20100114at400.png


I think that’s pretty close wouldn’t you agree :D The only thing letting me down is the damn weather!
 
thanks alot for the info's guys. i also installed theme on bowtie which goes along with the weather tutorial.
 

Attachments

  • cap1.jpg
    cap1.jpg
    31.1 KB · Views: 113
  • cap2.jpg
    cap2.jpg
    38.4 KB · Views: 123
Woomera, I've updated the guide. I changed the temperature code so that you don't get that space between the number and the degree symbol.

I started this from scratch three days ago and I've already counted at least 6 people using it. I'm very chuffed!

p.s. that bowtie theme is excellent. Did you make that yourself? Can you port it over to Ecoute?
 
Can we drop the F and C designator altogether?

of course!
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=ITXX0003&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/[CF]//' | tail -n 1
or with degrees symbol
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=ITXX0003&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/\(.*\) [FC]/\1°/' | tail -n1
 
of course!
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=ITXX0003&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/[CF]//' | tail -n 1
or with degrees symbol
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=ITXX0003&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/\(.*\) [FC]/\1°/' | tail -n1

Excellent!
:)

Woof, Woof - Dawg
pawprint.gif
 
Thanks again Poppero!

I would have updated the guide with some of the new codes, but I though it might get a little too convoluted. So I've left it as it is.

could everyone who's now made a HTC Geeklet using my guide post up pictures of how it looks on your desktop? I'd love to see how they all look.
 
Changed mine... AGAIN! I can't seem to stop tweaking it. Something tells me this thing is giving me OCD! :p

screenshot20100114at731.png

Just added a little top gloss to the separators for a bit more depth.

That looks great MacDawg!!

If you want the Hi-Lo temps to show the degree symbol try these two out

Hi
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=ITXX0003&u=" | grep -e "Forecast:" -A 1 | tail -n 1 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\H\: \1°\\ /"

Lo
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=ITXX0003&u=" | grep -e "Forecast:" -A 1 | tail -n 1 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/[A-Z a-z -]*\. High\:\ \(.*\)\ Low\:\ \(.*\)/\L\: \2°\\ /"
 
Thanks for all the help everyone, for some reason I can't figure out to make one like everyone on here.

I can't get that image to stay on my desk top threw Geektool. It only appear there as a downloaded image with a big grey box behind it. I guess i am going to have to go back to Geektool 101 to figure out how to make one.

But thanks again for everyone trying to help me threw this, when I figure out how to make one Ill post my success.
 
Thanks for all the help everyone, for some reason I can't figure out to make one like everyone on here.

I can't get that image to stay on my desk top threw Geektool. It only appear there as a downloaded image with a big grey box behind it. I guess i am going to have to go back to Geektool 101 to figure out how to make one.

But thanks again for everyone trying to help me threw this, when I figure out how to make one Ill post my success.

Maybe this will help?

The selected one showing in the properties box is the HTC background (as a geektool image placement). The other boxes show the various other elements layered on top of it.
 

Attachments

  • Picture 1.png
    Picture 1.png
    270.2 KB · Views: 129
Woomera, I've updated the guide. I changed the temperature code so that you don't get that space between the number and the degree symbol.

I started this from scratch three days ago and I've already counted at least 6 people using it. I'm very chuffed!

p.s. that bowtie theme is excellent. Did you make that yourself? Can you port it over to Ecoute?

no i have downloaded it from DA:
http://katsu3477.deviantart.com/art/FuKe-146296020
 
I am having an issue with the top command in geektool v3 RC5. I am running snow leopard 10.6.2. My main problem is that when I run my command:

top -n 20 -l 1 | cut -c 1-28 | tail -21

The PID for top, cut, and tail each increase by a few each time it updates. the PID for Top might be 4015 but later in the day it is like 51450. If I change the refresh time this doesn't happen so fast, but I was wondering if there was anyway to run top through geektool where it is constantly updating like running it from the terminal. If I run it in the terminal the Top PID never changes vs. creating a new instance in geektool each time it refreshes.

Is there anyway to run top without this occurring?

Any help would be greatly appreciated.
 

Attachments

  • Screen shot 2010-01-15 at 1.50.22 PM.png
    Screen shot 2010-01-15 at 1.50.22 PM.png
    41.8 KB · Views: 2,124
Pics of Top Output through geektool with PID increasing. See Previous post
 

Attachments

  • Screen shot .png
    Screen shot .png
    61.5 KB · Views: 2,118
  • Screen shot 2.png
    Screen shot 2.png
    38.1 KB · Views: 2,112
Is there anyway to run top without this occurring?


I don't think so... especially with the -l1 in there. You're effectively grabbing one output every second and OSX top is pretty limited in it's formatting (no way to cut the summary off with a switch, etc. so you'll have to pipe it to get just the part you're looking for).

You can obviously grep out the top/cut commands though if they bother you. They're only there when that top call runs.

I'd be happy to be proven wrong though.
 
Maybe this will help?

The selected one showing in the properties box is the HTC background (as a geektool image placement). The other boxes show the various other elements layered on top of it.

Thanks for the help. But how do you get the HTC background to run in the properties box so I can start putting the shells on it with the: Date, Time, ect.

Thank you again and everyone that is trying to help me with this.
 
jck1634 or anyone that has the full 'widget' up and running,

Can you export all the geeklets (done through the the properties pane)? Of course, give them a name like Background.glet/HiTemp.gelt/etc. and then zip them all up to post.

That way all anyone has to do is D/L it and customize from there.
 
Thanks for the help. But how do you get the HTC background to run in the properties box so I can start putting the shells on it with the: Date, Time, ect.

Thank you again and everyone that is trying to help me with this.

in the preference pane for Geektool, drag the Image icon out to your desktop, not the shell icon. Then in the properties box click on [set local path] a finder window will pop up. Locate the image you want (in this case the HTC.png) and place it on your desktop. That’s it. All the other ones are shell commands so you would drag the shell icon out on the desktop.

p.s. The separator.png image is done in the same way as the HTC.png. You drag the image icon out of the geektool preference pane and press [set local path] Do this after you’ve arranged everything. Do this last as it goes over the numbers. Also do this one twice with the same image. One separator for each image.

I really hope that’s cleared this up for you.
 
in the preference pane for Geektool, drag the Image icon out to your desktop, not the shell icon. Then in the properties box click on [set local path] a finder window will pop up. Locate the image you want (in this case the HTC.png) and place it on your desktop. That’s it. All the other ones are shell commands so you would drag the shell icon out on the desktop.

p.s. The separator.png image is done in the same way as the HTC.png. You drag the image icon out of the geektool preference pane and press [set local path] Do this after you’ve arranged everything. Do this last as it goes over the numbers. Also do this one twice with the same image. One separator for each image.

I really hope that’s cleared this up for you.


Yeah it did, I'm sorry that I had to ask so many questions but I figured it out. Thanks to your updated guide and everyones help on here, just finishing some things up on it and then I can post my picture.

Thanks again to everyone that helped me with this.
 
Screenshot2010-01-15at52646PM.png


Now the only thing that I am having problems with is the temperature, and the image of what the weather is going to look like for the day. But I got this far after 3 days of no stop questions.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.