#!/usr/bin/perl # # WEATHER.PL v0.01 # # try to grab Magdeburg info from weatherground.com # and to display only needed content... at least it # should do so. ################################################### # by Frank Reppin (2002) # shauwn@boerde.de ################################################### # too small to license... pick GPL or sth similiar. # # Ah ... and thanks to the ppl at wunderground.com # for providing worldwide weather data. # # You only need to edit $this_host .... # and you have to grab the correct URL to your city # from www.wunderground.com # Magdeburg is 10361.html in this working example. # This script behaves fine now since some weeks, # I only had to remove the dataoutput for windchill # since the dataoutput frequently changed at this # positon and i've found no way how to better filter # the html-file to get the correct values there. # I'll leave the commented 'print's below if you # want to check what's the output there. # # You can see this script in action at: # http://amazone.boerde.de/mrtg/ # ################################################### $this_host = "amazone.boerde.de"; system("wget -q http://www.wunderground.com/global/stations/10361.html -O /usr/local/mrtg-2/bin/addons/weather_temp.txt"); @Zeilen = (""); open(WETTER, ") { chomp; if (/