AccuWeather.com maps script
#1
i've been working on a script that takes your current weather.location and parses the information from accuweather.com for the approriate city code and state code. i can do this for the us and the world.

it works ok, but i can't find a webpage that has all their map urls. what i do is find them manually. because of this i've only gotten some maps for the usa. i would like to be able to find all the different urls without putting them in a config file.

if someone could offer assistance:

1. is there a webpage that could be parsed for all maps, even one that's based on a city, country or city, state.

2. i can't figure out how to find the airport codes web page. i know how to find it by clicking on their map. these give you the zoomed in radar. (nice)

any assistance or tips on how do this this would be appreciated.

thanks
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
nice idea. wouldnt it be possible to use the actual name of the location to find the correct map? if i search for goteborg on their site, i get a page with a small map on it that links to a bigger one. i guess they would have too many locations that would be feasible to put in a list, so if i was going to implement it i would send of a web page search to get the actual location/map for some city. i think it would work with the airports as well.
Check out my XBMC scripts at http://xbmc.ramfelt.se
Reply
#3
what would be really sweet is if we could convince the devs to integrate maps into the main weather screen.
I'm not an expert but I play one at work.
Reply
#4
i have the search and parse done for us. just need to finish up the gui.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
ok, if you need any help in testing maps for sweden/europe, let me know!
Check out my XBMC scripts at http://xbmc.ramfelt.se
Reply
#6
here is a script that downloads maps and radars from accuweather.com. it takes your current location from weather settings. it only works for the us right now. if someone would like to make it work for the world, i can give you a hand. maybe later i will look into it. for now i must move on.

if anybody would like to test the script. you can find it at

just copy the accuweather folder into your scripts folder.

there are xml files included that are needed. if you trust me just copy the skin folder into your xbmc folder. if you don't, the custom1156_accuweather.xml is needed for the main window for the script. i've included one for mc360 and one for pmiii. i've also included a myweather.xml with a button to link to the custom window, which then launches the script for both those skins.

if you just want to run the script, you need to launch accuweather.py, not script.py.

i've included the necessary config files for mc360 and pmiii also. if you use a different skin, just copy one of those and name it your skins folders name and make the necessary adjustments to the file. you'll find all the good stuff in the extras folder.

you'll need pil installed in your system/python/lib folder. just copy the whole pil folder and make sure it's named pil. you can get that here
make sure you get version 1.1.5 for python 2.4 windows version.

thanks for any constructive feedback.

edit: http://www.filefactory.com/get/v3/f2.php?f=acbe93



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
changed: organized the extras folder.
added: cropped the doppler radar into map/legend should look better.
changed: seperated the default settings from the config file.
changed: it now uses sendkey to close the window, if you have an older build you'll need the webserver running. this allows you to run the script from anywhere and not have it return to the weather page.
changed: the script now launches the window. no more script.py/accuweather.py
fixed: some bugs.

some cities don't have an airport code, so you can edit the default.xml for your preferences.


Quote:<?xml version='1.0' encoding='utf-8'?>
<settings name='accuweather.com default settings'>

<setting type='int' id='codesearch'>
<value>0</value>(usa code, leave alone for now)
</setting>

<setting type='str' id='location'>
<value>san antonio, tx</value>(change to your city)
</setting>

<setting type='list' id='defaults'>
<value>us_</value> (leave alone)
<value>sc</value> (region code)
<value>txs</value>(state code)
<value>ksat</value>(city code)
<value>sat</value>(airport code, used for the metro radar)
<value>namer</value>continent code used for the world temp map
</setting>
</settings>


edit the default.xml, so the script doesn't have to search for your codes at every launch.

you can get it here.

Image
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
added: saves your cities codes and checks for an xml file for the current location first before reverting to the default.xml.

http://www.filefactory.com/get/v3/f2.php?f=4445c2
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
ok, i really should stop assuming people have everything installed the same as me.

new version here

all lib files included, just copy the scripts and system folder into your xbmc folder.

the skin folder has custom*.xml's that are needed and myweather.xml files that add a link to the script. use those if you trust me.

added: each map has it's own refresh time.

this package also includes the necessary parsing libraries, hopefully that's why it didn't run for some people.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#10
thanks!
I'm not an expert but I play one at work.
Reply
#11
love the script, works well. i have a few interface suggestions...

1) i'd like if the "national", "regional", "state" settings were radio buttons, and they stayed 'static' when changing the map. so this means i could have it on "state" and just cyclec through the maps as i please.

2) love to see a slideshow of the maps... thus see all the "state" maps like a slide show, changing every x seconds... x being set by the user.

3) nice to have a default map the the script auto downloads upon opening... so there is not a blank area on the screen when you first start the script.

4) a slight layout change so that the legends are easier to see... on 720p the legends are too small, and i have perfect eye sight. maybe placing the legend directly under the image like the web site has it may be better... and give more room to make it larger? i may require taking up some of the upper title bar space so making a custom bg may be best. choke may help if we ask nicely Wink
I'm not an expert but I play one at work.
Reply
#12
1. my thinking was the list would be too long and not organized enough. that's why it is the way it is. maybe an option to choose organized or chaotic Smile

2. slideshow would be doable, but only for the maps that are downloaded, unless your saying cycle thru and download as needed?

3. makes sense, maybe configurable in an xml?

4. each skin can be set up in a skin.xml as you like. i had the legend underneath and some were easier to read. but i'm no designer. if you come up with a nice layout let me know.

another thing i just added was an option for aspectratio. on 720p it looks better as is, but 4:3 aspectratios it looks better as keepaspectratio, but it makes the maps smaller.

i've also taken off the grid for the doppler radar, don't know if you have that version, maybe an option, it's kinda useless anyways.

thanks for the feedback. keep em coming.

oh and i fixed a bug that effected mc360, i didn't have any problems with pmiii, but if your playing music and the script freezes, i have that fixed.

edit: just thought about number 1, an all, choice, that is doable i think.



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#13
as for #1 i was thinking you could have the radio button options as such at the across the bottom or top...

() state () region () national

saves space

but more importantly, having it a 'static' setting.

for the slide show...

() all would be useful for the slide show.

i'd say dl the first one and then show it for x seconds while dling the rest of the images... in the background as much as possible. if the x seconds is long enough after the first one loads there should not be any pausing between images when they change.
I'm not an expert but I play one at work.
Reply
#14
ok, #1 is done, not exactly how you wanted though. the top button (category) now has an all option. i didn't want the radio buttons, but it works the same.

#3 is done. there's a set as default button, it save the current setting, not the current display map necessarily.

#4 can be done by the individual, by editing the proper \extras\skins\skinname.xml and the custom*.xml if needed.

#2 i'm not sure how to do this, i may not try. good idea though, just tough to incorporate.

thanks for the suggestions.

[img]http://s2.supload.com/thumbs....mg]

you can get it here



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#15
Image



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
AccuWeather.com maps script0