Thread
:
Weather lockscreen and widget..it works now.
View Single Post
woody14619
2013-02-06 , 21:56
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#
43
dzano,
Great work on this. There are a few issues with the script though:
First, it assumes that all xml files from different regions are the same length and have the same info on exactly the same lines. That's not at all true.
It also assumes that the file names stay the same. They don't. They change randomly, from months to days apart.
Also, the icons are huge, and many are identical.
In that regard... I rewrote the script. It should work for most people, out of the box, few settings changes. All you have to do is choose what area you want to default to, since the widget allows you to have multiple "home" weathers.
This version only relies on 13 of the icon files (non redundant), and does conversions for °C to °F, and Kph to Mph, which is easy to change back if you prefer. (The xml is always in metric values apparently.)
Anyway... check it out, and let me know what you think. Feel free to pull it in, make changes, or whatever.
Overall I really like this compared to the other scripts I worked with/wrote to do this, since it's getting the weather from a reliable and rather un-changing source (the XML). The previous one relied on Yahoo weather, but Yahoo changes it's page formats every few months, and it's radically different by region.
Ideally, one would run this in pearl, and use a proper XML parser to do this work. But for now, shell works.
I commented parts a bit as well, so it should be more readable.
Anyway, enjoy!
Attached Files
weather.sh.gz
(1.4 KB, 99 views)
__________________
Maemo Council Member: May 2012 - November 2012
Hildon Foundation founding member.
Hildon Foundation Board of Directors: March 2013 -
Jan 15, 2014
Quote & Reply
|
The Following 2 Users Say Thank You to woody14619 For This Useful Post:
dzano
,
n900d-i-y
woody14619
View Public Profile
Send a private message to woody14619
Find all posts by woody14619