Bravo, *tcutting*. You're further along than I am. I've gotten the
free developer key and managed to write a stand-alone perl program that
displayed weather data.
The only time I've ever coded in perl is in trying to fix this plug-in
over the years. It's not that much fun. I can see how *plympton *could
have been traumatized by the experience. :)
I'm doing this on Windows, and this seems to increase the complexity. It
seems that Perl isn't *really* installed with SqueezeServer on
Windows... it's auto-packaged as part of the service (I *guess*). That
means no automatic installation of CPAN routines like you could do on a
real perl installation -- You have to package all the modules you want
to use as source code in the .PM file. And then there's the issue of
compatibility with a given version of perl. Arrrgh.
In the interest of sharing (I know *I* can use all the help I can get)
from looking at the Greg's code, which is pretty well structured, and
the Weather Underground API, I can share the following observations that
may or may not be helpful:
- The number of forecast phrases (such as "partly cloudy") is
significantly smaller in the new API than it was on the previously
scraped page.
- The new icon numbers do *not* correspond to the old icon numbers...
so the icons are going to need to be remapped.
- One nice thing is that the API returns all the measurements in both
US and Metric... so no conversions are required anymore. Yay!
- It's not clear if the new icon set will work in place of the old,
due to the geometry of the new icons.
- In using the WWW::Wunderground::API module from CPAN, issuing the
request and getting the reply is made trivial (the JSON reply is
pre-parsed and returned in an array, for example the current temp F is
returned in "$wun->conditions->temp_f"). One call for "conditions"
appears to be returning *all* the data needed... which I don't really
understand, because when I issue the same call from the Apigee Console
on Weather Underground I *just* get the conditions. Odd.
-
I'm going to try to build a PM file today containing source from
WWW::Wunderground::API, Cache::Cache, and whatever prerequisites these
require.
I would **greatly** appreciate anybody working on this API to share
their thoughts and findings (minus their API key :) ) -- I'm happy to do
likewise. For ME, the programming itself doesn't seem like it'll be the
hard part (assuming use of the WWW::Wunderground::API module)... it's
all the associated infrastructure around using perl as part of
SqueezeServer on Windows.
------------------------------------------------------------------------
PeterGV's Profile: http://forums.slimdevices.com/member.php?userid=31531
View this thread: http://forums.slimdevices.com/showthread.php?t=14327
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins