Main index > About new desklets > Radar map

By Noobuntu (User), on Wed Jun 29 07:38:30 2005: Radar map.

Hi,

What about a "Radar map" adesklet? It would be a really good addition to the Weatherforecast desklet.
Just any desklet that fetches some image from the net would suffice.

By cs-cam (Desklet Author), on Wed Jun 29 07:44:05 2005.

I have seriously thought about that.... but I didn't because I don't really want a radar image on my desktop and t the time I didn't know enough Pyhton/Imlib2 to remove background colours which would be my preference.

Give me a link where to find radar images online and I'll have a go ey? It would be nifty

By syfou (Core Developer & Desklet Author), on Wed Jun 29 10:27:15 2005.

Radar maps can be found on weather.com web site... Look at this small patch (first post on top) by Mike Pirnat for the URL details. Yours,

By cs-cam (Desklet Author), on Sat Jul 2 00:16:50 2005.

http://www.myfilebin.com/userfiles/cam/weatheradar-0.0.1.tar.bz2

Done. it's not that crash hot but it works. There's nothing fancy in there, weather.com has it's radar images in iframes so I had to parse the source of a couple of pages to get the image URL so it takes a few seconds to load up depending on your connection. 2-3 secs here on 1.5Mbit ADSL. Config.txt just takes image dimensions (it uses PIL to resize) and your weather.com location code, hope that does what you're after :)

By ZeroDivide (Desklet Author), on Sun Jul 3 16:15:13 2005.

Cool desklet cs-cam.. You're really on a roll :D

Theres one small problem I noticed after running the desklet for a while and never having the radar image update. Imlib is cacheing the /tmp/weather_com.jpg image, so it never really gets reloaded. An easy fix would be to change line 29 to use load_image_without_cache() instead of load_image().

image_set_changes_on_disk() would also be a fix but I couldn't get it to work (using adesklets 0.4.10).

btw.. why did you decide to use PIL instead of imlib to resize the weather image?

By cs-cam (Desklet Author), on Sun Jul 3 18:56:49 2005.

Heh, cause I don't know how to do it with Imlib and it didn't occur to me that adesklets is based on Imlib so I didn't think to look it up. I'll fix those couple of thigns today and upload changes :)

By cs-cam (Desklet Author), on Mon Jul 4 23:32:12 2005.

sorry for not having this done, been a bit under the weather lately, am posting this off my mobile phone from bed. will fix this up hopefully in the next couple of days...


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.