August 27th, 2008, 1:35 am

Preview shows included styles, clockwise from top-left: iconOnly, myopia, split and originalBubble. All with Klear icon set. (The background and dock are from the Dark Aluminium shelves or Wooden shelves sets.)
Latest Download: Click Here
Additional Icon Sets: Tango
Credit:
Largely Coded in XHTML, CSS and JS by myself barring the AccuWeather fetcher 'borrowed' from Leopard*.
Data sources are currently either AccuWeather (Apple's feed*) or Yahoo!Weather (beta-quality).
With help from Jimmy who located the Klear and Tango icon sets and designed the 'split' display style.
(N.B. This is technically unrelated to, but inspired by, sjaq's release.)
As regards the newly added LockBackground.html in Winterboard:
For this to work correctly, sharing data between both Lock screen and Wallpaper, I will need to write the data to a local database (as spec'd in HTML5). This will involve a significant rewrite.
There is also a significant problem with just copying Wallpaper.html to LockBackground.html, as doing so will result in hitting Apple's servers every time you view your lock screen. The lock screen WebView is not persistent!!
I do intend to release a version which has significant improvements generally to the backend that will use the same data for the LockBackground and Wallpaper. However this release is currently stalled by a bug in Winterboard preventing the use of HTML5 clientside databases. Saurik has been made aware of this and, while he can obviously make no promises, it may be fixed at some point.
Basic Installation
Having unzipped WeatherWidget.theme.zip edit WeatherWidget.theme/Private/configureMe.js so that the line:
- Code: Select all
var locale = "…"
reads correctly for your location (e.g. 'Defiance, Ohio', 'Moscow, Russia, 'London, UK').
Then just copy WeatherWidget.theme into /Library/Themes onto your iTouch.
Changing Appearance
Both the icon sets and layout can be changed by editing the iconSet and stylesheet variables respectively.
You can design your own icon set placing a folder with correctly named files (see one of the included sets for the schema; compatible with KWeather) in the Icon Sets folder and your own stylesheet in the Stylesheets folder.
Please post your creations! (As a warning, the structure of the XHTML may yet change, although I am trying to maintain compatibility.)
Troubleshooting
Not Found usually indicates you should try a variation on your locale. Apple/Accuweather's backend is very good but can be stumped. (Yahoo!'s is unforgiving.)
No Response usually indicates that you need to check your iTouch is connected to the Internet. The AccuWeather servers could also be down.
You can try checking with Leopard's Weather widget that your locale works.
*Copyright Note
I feel that it is not too great infringement to use relatively generic code by Apple (which I am now butchering anyway) and Apple's (presumably paid-for) feed to help provide this; it will only be used a relatively small number of people on an Apple-manufactured device. Nevertheless, I am aiming to build a number of alternative, free feeds and eventually retire the Apple/Accuweather source,
As regards the rest of the code, you're free to modify and redistribute so long as you attribute.
The Klear icon set is provided under the GPL by 'Kubicle'
Last edited by Zetetic Apparatchik on August 29th, 2008, 4:05 pm, edited 1 time in total.






