Document Viewer

Hello,

We have a 32" LCD set on a wall with a cycling screen, to show the status of different machines. I would like to add a few things to this:

Weather
Utility Status

I found the document viewer plugin and pasted a link to Accuweather’s site for our radar. Is there a radar-only link? Does anyone have a recommendation about how to strip out the radar and maybe forcast information easily? I’m hoping someone has done this before.

oge.com/systemwatch/ - This is the link to our utility System Watch. It does have a radar overlay, but it is displayed with Macromedia Flash. Is this doable?

Thanks,
Matt

Embedding flash probably isn’t going to be your best bet, althought you might be able to get that to work with the (free) ActiveX plugin.

Scraping a weather page for info and displaying it is a fun trick. See this script (which I copied and pasted from the user manual)

[code]# This function would query Yahoo Weather for the temperature at

the given zipcode and find the temperature using a regular expression

def getTempAt(zipCode):
import fpmi
import re #Regular Expression library

response = fpmi.net.httpGet("http://xml.weather.yahoo.com/forecastrss?p=" + str(zipCode))

# NOTE - if you've never seen regular expressions before, don't worry, they look
# confusing even to people who use them frequently.
pattern = re.compile('.*?<yweather:condition (.*?)/>', re.DOTALL)
match = pattern.match(response)
if match:
	subText = match.group(1)
	temp = re.compile('.*?temp="(.*?)"').match(subText).group(1)
	return int(temp)
else:
	fpmi.gui.errorBox("Yahoo weather service changed")
	return -1[/code]

Also, notice that linking to this image brings in an updated radar map for california:
(sirocco.accuweather.com/nx_mosai … SIRCAC.gif)

Hope this helps,

Anyone have a copy of that weather component that had the images included from Yahoo weather? (Partially cloudy, sunny, etc). It would make a nice Goody.