BOM Website and sourcing Australian weather temperature using Bash
We once had a challenge in our Linux Operating System class to use bash to connect to the Australian BOM website (Bureau of Meteorology) and extract the current temperature in Melbourne. The task was quite trivial and involved the use of grep, awk and sed to extract the information.
Listed on the BOM website are two pages that allow us to get the current temperature reading at various weather stations and also the weather headline.
I have provided the script as an example of a simple way to retrieve the information from the BOM website. It could be used with a crontab script setup to run every 5 minutes and can update a text file, which you could then use to display on your website.
This script can easily be re-written to extract all the weather forecasts and current temperatures for various australian weather stations. It would be a good idea to have this extended to be a public web-service. I had later rewrote this script to generate XML with complete conditions (warnings, wind direction etc) and not require wget. If I find it I will post it, I had just stumbled across this one in the attic.
Download the bash script here, please respect as GPL.
If you simply want the current weather temperature there is a free webservice located here:http://www.stanski.com/services/worldweather/weather.asmx?op=getMelbourneTemperature






Hey
Thanks for these. Did you ever find that xml script?
Tim
Comment by Tim — March 24, 2008 @ 10:11 am