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.
Hi,

Does somebody know how to get the METAR and/or TAF from one specific airfield with geektool ?

example
METAR messages of some airfields
http://www.knmi.nl/actueel/metar.html

TAF messages of some airfields
http://www.knmi.nl/waarschuwingen_e...vaart/nederlandse_vliegveldverwachtingen.html

cheers,

Maybe something like this?

Code:
curl --silent http://www.knmi.nl/actueel/metar.html|grep ^METAR

and

Code:
curl --silent http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html | grep ^TAF
 
Maybe something like this?

Code:
curl --silent http://www.knmi.nl/actueel/metar.html|grep ^METAR

and

Code:
curl --silent http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html | grep ^TAF

is it possible to select just one message ?

for example only " EHBK"

METAR
http://www.aviador.es/metar.php?icao=EHBK&type=Metar

TAF
http://www.aviador.es/metar.php?icao=EHBK&type=Taf

LAST 4 METARS
http://www.aviador.es/metar.php?icao=EHBK&type=Metars

ALL weather reports for EHBK
http://www.aviador.es/metar.php?icao=EHBK&type=Wx

Would be awesome !
 
Awesome works

is it possible to select just one message ?

for example only " EHBK" and "EHAM" for both TAF and METAR ?

example site information beneath rain picture ( metar - short taf and long taf )
http://www.allmetsat.com/nl/metar-taf/nederland-belgie-luxemburg.php?icao=EHBK

Yep, with a different grep:
Code:
curl --silent http://www.knmi.nl/actueel/metar.html | egrep '^METAR (EHBK|EHAM)'

will give you:
METAR EHAM 251855Z 21017KT 9999 FEW035 SCT045 09/06 Q1000 TEMPO
METAR EHBK 251855Z AUTO 21016KT 9999NDV NSC 09/07 Q1005 NOSIG=

Similar for TAF:
Code:
curl --silent [URL="http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html"]http://www.knmi.nl/...verwachtingen.html[/URL] | egrep '^TAF (EHBK|EHAM)'

TAF EHAM 251712Z 2518/2624 22018KT 9999 SCT025 SCT045
TAF EHBK 251712Z 2518/2624 21018KT 9999 SCT025 SCT045

If you want only one then this will be sufficient:
Code:
curl --silent http://www.knmi.nl/actueel/metar.html | grep '^METAR EHBK'

You can even combine both sites:
Code:
curl --silent [URL="http://www.knmi.nl/actueel/metar.html"]http://...(1)[/URL]  [URL="http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html"]http://...(2)[/URL] | egrep '^(METAR|TAF) EHBK'

Gives:
METAR EHBK 251925Z AUTO 22016KT 9999NDV FEW024 09/07 Q1006 NOSIG=
TAF EHBK 251712Z 2518/2624 21018KT 9999 SCT025 SCT045
 
Yep, with a different grep:
Code:
curl --silent http://www.knmi.nl/actueel/metar.html | egrep '^METAR (EHBK|EHAM)'

will give you:
METAR EHAM 251855Z 21017KT 9999 FEW035 SCT045 09/06 Q1000 TEMPO
METAR EHBK 251855Z AUTO 21016KT 9999NDV NSC 09/07 Q1005 NOSIG=

Similar for TAF:
Code:
curl --silent [URL="http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html"]http://www.knmi.nl/...verwachtingen.html[/URL] | egrep '^TAF (EHBK|EHAM)'

TAF EHAM 251712Z 2518/2624 22018KT 9999 SCT025 SCT045
TAF EHBK 251712Z 2518/2624 21018KT 9999 SCT025 SCT045

If you want only one then this will be sufficient:
Code:
curl --silent http://www.knmi.nl/actueel/metar.html | grep '^METAR EHBK'

You can even combine both sites:
Code:
curl --silent [URL="http://www.knmi.nl/actueel/metar.html"]http://...(1)[/URL]  [URL="http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/nederlandse_vliegveldverwachtingen.html"]http://...(2)[/URL] | egrep '^(METAR|TAF) EHBK'

Gives:
METAR EHBK 251925Z AUTO 22016KT 9999NDV FEW024 09/07 Q1006 NOSIG=
TAF EHBK 251712Z 2518/2624 21018KT 9999 SCT025 SCT045

very nice, but I have a last question:

how do I get the Long TAF (3 lines) ?
http://www.aviatorjoe.net/go/wx/EHBK/2/ or else form this site http://www.aviador.es/metar.php?icao=EHBK&type=Taf
 
Need help

Ok so i know you guys are all probably gonna get mad at me for asking this, but i really dont feel like looking through all 50 pages of this thread to find this answer. Did anyone find out how to put a weather condition image in geektool. i've looked all over google, and tried everything but nothing is working. I have even spent the last 2 hours looking for some way.

Thanks

Current Setup below(not that good, only been using geek tool for 1 day)
 

Attachments

  • Screen shot 2009-11-25 at 10.39.32 PM   11-25-09.jpg
    Screen shot 2009-11-25 at 10.39.32 PM 11-25-09.jpg
    293.7 KB · Views: 717
I created a 'shell' that gets the weather picture:

curl --silent "http://weather.yahoo.com/spain/valencia/elx-759880/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather_test.pngxargs curl --silent -o /var/tmp/weather.png

An then an 'image' that displays the weather picture on the desktop

file://localhost/var/tmp/weather.png

You will need to change the URL (http://weather.yahoo.com/spain/valencia/elx-759880/) so that it gets weather in your location.
 
Anyone know how to put 2 different calendars on the desktop??

Calender: cal

---------

Last Month

cal $( echo $(date +%m)-1 | bc ) $(date +%Y)

Or

cal -m $(date -v-1m +%b)

Or

cal $(date -v -1m ” %m %Y”)

Current Month


(today shown as ** or #)

cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./*/g') /"

Or

cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"

Or

cal $(date ” %m %Y”)

Next Month

cal $( echo $(date +%m)+1 | bc ) $(date +%Y)

Or

cal -m $(date -v+1m +%b)

Or

cal $(date -v 1m ” %m %Y”)

Month after next

cal $( echo $(date +%m)+2 | bc ) $(date +%Y)

Or

cal -m $(date -v+2m +%b)

---------

You can add / subtract any number of months, and since it's running in the Date command, it won't have issues with the fringe months.

Calendar

cal | awk -v cday=`date "+%d"` '{ fill=(int(cday)>9?"":" ");

a=$0; sub(" "fill int(cday)" ","["fill int(cday)"]",a); print a }'

Or else you can download dateline for mac
http://www.macupdate.com/info.php/id/18272
 
Couldn't you just configure Geektools with File (instead of Shell) and point the file to users/YOURUSERNAME/Library/Logs/.../XXXX.log (or whatever file you want to display)?

back in the day. But as far as I can tell the console doesn't spit out its report in a log file anymore. So I can't figure out where the log is stored in Snow Leopard.
 
I created a 'shell' that gets the weather picture:

curl --silent "http://weather.yahoo.com/spain/valencia/elx-759880/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather_test.pngxargs curl --silent -o /var/tmp/weather.png

An then an 'image' that displays the weather picture on the desktop

file://localhost/var/tmp/weather.png

You will need to change the URL (http://weather.yahoo.com/spain/valencia/elx-759880/) so that it gets weather in your location.

Thanks so much, this works. but my command to get the weather and condition has stopped working and all the other ones i've tried ahve stopped working too. Can you help please??
 
Thanks so much, this works. but my command to get the weather and condition has stopped working and all the other ones i've tried ahve stopped working too. Can you help please??
What refresh rate(s) to have set for your scripts that access Yahoo?
 
Calendar

thanks G0dl1k3 but i mean having 2 different calendars like a chinese calendar and the normal calendar (Jan, Feb...).

can it be done?
 
thanks G0dl1k3 but i mean having 2 different calendars like a chinese calendar and the normal calendar (Jan, Feb...).

can it be done?

Sure it will be possible, but I iam not familiar with the codes used to show these kinds of calendars
 
has anyone done a GS for sport scores? I am would like one for the NBA scores and/or standings..

would i need to just to an RSS feed?
 
Hi,

am i seeing it wrong or the link you posted actually as the command to do it?
Code:
CPU hogger!

ps -acx -o %cpu,command | awk '!/0.0/&&!/%CPU/ {if($1>t){t=$1;v=$0}} END{print v}'

Top Processes

top -ocpu -FR -l2 -n20 | grep '^....[1234567890] ' | grep -v ' 0.0% ..:' | cut -c 1-24,33-42,64-77

I didn't have a chance to test so ...

Yeah you see right but when I put that code in nothing shows up. I attached a picture of that in one of my post.
 
Is anyone else having a problem with their Weather Underground weather scripts?

I have the two scripts everyone uses:

Temperature
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i }'

Condition
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'

And they worked fine for months. Then suddenly about two weeks ago they stopped working.

I have a Forecast script that I use that retrieves weather from Yahoo via Curl that works fine still. But the ones above which use Lynx don't work anymore. I just tested Lynx and that's still working fine.

I just tried running the scripts through the Terminal itself and they don't work. Going to the site itself reveals it is down. "Internal Server Error". At least the Printer site. WWW works fine still.

So does anyone have a replacement for temperature and condition? I now have a gap in my screen between my date and iTunes because it's gone.
 
Is anyone else having a problem with their Weather Underground weather scripts?

I have the two scripts everyone uses:

Temperature
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i }'

Condition
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'

And they worked fine for months. Then suddenly about two weeks ago they stopped working.

I have a Forecast script that I use that retrieves weather from Yahoo via Curl that works fine still. But the ones above which use Lynx don't work anymore. I just tested Lynx and that's still working fine.

I just tried running the scripts through the Terminal itself and they don't work. Going to the site itself reveals it is down. "Internal Server Error". At least the Printer site. WWW works fine still.

So does anyone have a replacement for temperature and condition? I now have a gap in my screen between my date and iTunes because it's gone.

Don't know if you want it to be a geektool replacement or if it doesn't matter, but I personally think the yahoo widget looks 100x better then anything you can do with geektool. Heres the link if your interested http://widgets.yahoo.com/widgets/widescapeweather
 
here is a tricky questions. Can I make the date display in another language? my system is all german but the date is in english. Was wondering if I could change it. thanks.

Justin
 
Not sure y this is happening but maybe some1 can help me here. I tried searching and didn't come up with any answer. Is any1 else getting this?Any help is greatly appreciated!

This is the code I used:
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./*/g') /"

Screenshot2009-11-28at121618AM.png
 
Not sure y this is happening but maybe some1 can help me here. I tried searching and didn't come up with any answer. Is any1 else getting this?Any help is greatly appreciated!

This is the code I used:
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./*/g') /"

Screenshot2009-11-28at121618AM.png
Use a fixed-width font and things will line up.

It's working "as designed". This script is supposed to display ** for the current day (the * at the end of the script is used in lieu of the current date value).
 
Use a fixed-width font and things will line up.

It's working "as designed". This script is supposed to display ** for the current day (the * at the end of the script is used in lieu of the current date value).

DUDE THANKS A MILLION!!! I LOVE THIS THING!!! IT LOOKS GREAT!:D

Screenshot2009-11-28at125011AM.png
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.