Main index > About existing desklets > weather

By syfou (Core Developer & Desklet Author), on Sat Feb 26 13:27:31 2005: weather.

Weather desklet issues are discussed here.

By elbriga (User), on Tue Mar 15 12:07:58 2005: LOCATION list.

Where can I find a list of possible LOCATION list?

thanks already, Gabriel

By syfou (Core Developer & Desklet Author), on Tue Mar 15 12:18:45 2005.

On weather.com, as specified in the config.txt file:

In config.txt from weather 0.0.3, I wrote:


# This is weather.py desklet configuration file; for each desklet,
# you only have to write down the minimal delay between updates
# (in seconds: less than 300 will be ignored),
# the location code from www.weather.com and specify True or False for
# metric, depending if you want temperature given in Celcius or in
# Fahrenheits.

Just look up the wanted location in their database using the form on main page, then look at the URI used to retreive the information.

Regards,

By TimSchutte (Fearless Moderator), on Tue Mar 15 12:35:36 2005: weather.com locations.

Hi Gabriel,

Here is how to find the codes you need:

Go to http://www.weather.com and type in the name of your city in the search box. When it returns your city, locate and copy the code in the URL and paste it into the 'location' item in the weather desklet's config. Here is an example:

http://www.weather.com/outlook/recreation/outdoors/local/USCA0090?from=search_city

In this case, the code (for Beverly Hills, California) is 'USCA0090'. That is what goes into the config.txt

Hope that helps!
Tim

By exilejedi (Core Developer & Desklet Author), on Tue Mar 15 13:10:44 2005.

I also had unexpected good luck using my ZIP code as the location string (which may or may not be useful to you, depending on whether or not you're in the US).

By syfou (Core Developer & Desklet Author), on Wed Mar 16 11:15:08 2005.

elbringa wrote:


Ie posted on Usage problems that the weather desklet cant get trought the proxy, and I used the URL on thr browser and worked. It worked because my browser is configured to go trought the proxy xxx.xxx.com:8080 to get to the web, and the desklet is not. There is a way to alter the py file to get trought the proxy or at least to make it run a shell script to do something like a wget to get the weather.com XML?

thanks, Gabriel.


Sorry, I failed to envison this possibility last time.

Python works transparently with proxies which do not require authentication. In a Unix environment, set the http_proxy, ftp_proxy or gopher_proxy environment variables to a URL that identifies the proxy server before starting the Python interpreter. For example (in bash)::

Code:


export http_proxy="http://xxx.xxx.com:8080"
python weather.py



Should start up a temporary (non-registered) weather desklet going through your anonymous proxy. If you use a authentification-enabled proxy, I could also provide you a patch...

By elbriga (User), on Wed Mar 16 12:12:44 2005: proxy.

I use the env variable http_proxy="http://user:pass@xxx.xxx.com:8080", it doesn't work.... could you send me this patch?

By syfou (Core Developer & Desklet Author), on Wed Mar 16 12:31:59 2005.

elbringa wrote:


use the env variable http_proxy="http://user:pass@xxx.xxx.com:8080"


That's not anonymous, that's the reason it do not work... But I guess you already knew that from previous posts.

elbringa wrote:


could you send me this patch?


Yes, but I first need to write it... Let me get the time to finish what I am doing, With a little chance, I should get back to you before 15h00 GMT - 5 .

If you are really in a hurry, you could as well set up a proxy redirector, as it is a very generic (and useful for automated transparent proxying) . There are plenty good ones on freshmeat.net, but personally I had good experiences with metraprox, and it works on most BSD's.

By syfou (Core Developer & Desklet Author), on Wed Mar 16 13:47:08 2005.

Whoops. I guessed I promised something I cannot do. From the official Python documentation:

Quote:


This module does not support the use of proxies which require authentication. This may be implemented in the future.

Sorry about that; you still have previously mentionned method of "proxing your proxy", though.

By elbriga (User), on Thu Mar 17 06:43:11 2005: proxy.

OK! Thank you.

By Ryanx0r (User), on Thu Apr 7 10:37:22 2005.

Ok, firstly, this is one great desklet :) love it.. and love the 'real timeness' :).
But I have recently noticed a 'bug' well, not quite a bug, more of a beauty glitch.
This *could* be my system being retarded, but I thought I'd ask.

Now, I know the background image is a certain fixed width, which is ok (although a nice variable width wouldn't hurt :D). But once I get longer weather descriptions, such as (at the moment) "Rain Shower and Windy) everything (location, description and temp.) moves off to the left, so now the left most part of the text is *over* the main image, which looks pretty ugly. I've been looking around the code, just to see how it was built and if there *might* be a way to fix this little glitch. Although I've never seen Python in my life (it doesn't look too hard to learn).
Anyway, is therz a fix for this problem? Is it known?
And one more question. I notice in most of the weather desklets there is a variable cc (which is usually found in some kind of an array (if something['cc'] is concidered an array in python). I would just like to know what this variable is (I gather it gets pulled from the URL (weather.com) but I don't quite see it.

By syfou (Core Developer & Desklet Author), on Thu Apr 7 16:02:37 2005.

Thanks for the report, Ryanx0r.

This is a known problem with weather. Many other "beauty glitch" such as this exist, but that's the one getting reported the most. This is not a big task to correct, and what you suggest about parametrisation is undoubtedly the right way to go. Have a look here. I do not use this as an excuse not to work on on this, and I will eventually do it, I just do not know when yet. :-)

Ryanx0r wrote:


And one more question. I notice in most of the weather desklets there is a variable cc (which is usually found in some kind of an array


Yes. cc stands for current conditions. You can have a complete description of the weather.com service online by registering for free. Here is a standalone python script in case you want to play with this (highlighted source also available).

By eNTi (User), on Sun Oct 9 09:38:54 2005.

would you consider switching to accuweather? the weather.com is very unaccurate for europe. i mean it showed rain for about the last week or so and there's still a cloud to show up here.

By syfou (Core Developer & Desklet Author), on Sun Oct 9 15:44:01 2005.

I would probably not "switch" to another source, but I would definitively consider including alternatives (especially if you send me patches :-) ).

I looked at AccuWeather (too?) briefly, and it looks like they do not allow the creation of third-party products using their data unless you are a paid, licenced customer. Let me know if I am wrong (with some precice pointers).

By eNTi (User), on Sun Oct 9 15:46:44 2005.

well. i'm using a extension "forecastfox" for firefox, that uses accuweather.

By syfou (Core Developer & Desklet Author), on Sun Oct 9 16:29:20 2005, last edited on Sun Oct 9 16:50:52 2005.

I looked at forecastfox 0.8.2.2 code: it uses a commercial licence, acquired by Vortex Search through a dot com venture called ensolis. I have no idea what is the cost of such a licence (I could not find a price list on AccuWeather), but this does not look "free as in free beer". :-)

By eNTi (User), on Sun Oct 9 16:50:19 2005.

oh nice... didn't know that.


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.