Mac OS X only: Reader Rodolfo Novak posts a useful script to add the current weather conditions to your Mac desktop using the GeekTool desktop overlay. The script is nothing more than a bunch of *nix commands chained together to pull down the weather from Yahoo and output only the current conditions to the console—meaning that you can run this script anywhere with access to the Bash shell and common tools, including previously mentioned Cygwin on Windows . To make this really useful and display it on your desktop, you can add the following as a shell script in GeekTool, replacing the YOURCITYCODE text with the actual code from Yahoo's weather feed.
...p=YOURCITYCODE&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'
↧