Technetra

Updated Weather gDesklets

Nilayan Sharma,  April 20th, 2007 at 1:00 am

If you use Linux, you’ll want to try out gDesklets. gDesklets is a framework written in Python for the GNOME desktop where interactive graphical widgets (similar to Dashboard on MacOS) provide easy access to weather forecasts, calendars, clocks, RSS feeds and more right on your desktop.

A typical installation of gDesklets comes with many widgets that are ready to use with minimal configuration. However some widgets don’t quite work as you’d expect.

I needed to be able to see current local weather conditions on my desktop. I tried the gDesklet weather widgets, none of which worked. Most of the problems were due to outdated regular expressions used to interface with Yahoo’s weather service. So I fixed them and, while I was at it, added some features too. If you see any bugs, send me a note at osscode(DOT)tn(AT)gmail(DOT)com

Code fixes include

  • updated regular expressions to parse current Yahoo weather pages
  • fixed code for fuzzy weather location matches
  • added a checkbox in the configuration UI to allow the user to select either a city/country combination or a direct Yahoo weather URL
  • added a breadcrumb style display for the weather location path
  • fixed code for launching web browser (to view current location’s Yahoo weather page) when user clicks on graphical widget
  • tested with gDesklets version 0.35.3

Download

What’s inside?

 20070420-weather-gauge-gdesklets.tar.gz
 |--> Displays
 |       `--> weather_gauge                       -- files used by Weather Gauge desklets
 |               |--> gfx                         -- background images used by desklet UI
 |               |--> weather-gauge-small.display -- Weather Gauge Small desklet UI definition file
 |               `--> weather-gauge-large.display -- Weather Gauge Large desklet UI definition file
 `--> Sensors
         `--> WeatherYahoo                        -- Yahoo weather service interface
                 |--> icons                       -- icons for weather conditions
                 |--> locale                      -- files used for localizing desklet
                 `--> __init__.py                 -- Python code for WeatherYahoo interface

Download: 20070420-weather-gauge-gdesklets.tar.gz
sha1sum: 7c248e5611df1061f5f1a1d2d908c2eaaa5a2bc8 20070420-weather-gauge-gdesklets.tar.gz

How to use weather desklets

  1. Install gDesklets (if you haven’t already)
  2. cd /usr/share/gdesklets
  3. Extract 20070420-weather-gauge-gdesklets.tar.gz
    tar xzf 20070420-weather-gauge-gdesklets.tar.gz
  4. Launch gDesklets Shell
  5. Look under the ‘Weather/Current Conditions’ category and select ‘Weather Gauge Small’ or ‘Weather Gauge Large’

© Nilayan Sharma, Technetra. This work is licensed under a Creative Commons Attribution-No Derivative Works 3.0 License. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

The End of DRM Article Index No Strings Attached

Comments

9 Responses to “Updated Weather gDesklets”

  1. June 19th, 2007 at 10:35 pm (Comment)
    Adler Says:

    Hi,

    So, I’ve downloaded the package w/ GDesklets running. I use the OSX clock on my Desktop. How should I add your package to the mix?

    Thanks in advance for your reply.

    Adler
    Phoenix, Arizona

  2. July 13th, 2007 at 12:48 pm (Comment)
    neuman Says:

    When I load your weather-guage desklet, it tells me that I don’t have the WeatherYahoo sensor. Where do I get the sensor, and why its it automatically packaged with the guage?

  3. July 17th, 2007 at 2:54 pm (Comment)
    Nilayan Says:

    @neuman — I just tried installing on Fedora 7 and ran into the same problem. Copying the ‘Sensors’ directory from ‘20070420-weather-gauge-gdesklets.tar.gz’ into the ‘$HOME/.gdesklets’ directory fixed it.

    – Nilayan

  4. September 11th, 2007 at 5:11 pm (Comment)
    Dan Says:

    I have installed the gdesklets, and also the weather-gauge. I like the looks of it. I am having a problem though:
    1) I have set up the “use Weather Page URL” because it doesn’t seem to find “Birmingham Alabama” :) 2) It (the weather gauge) comes up with “Unknown” (in every field)

    I think it is a proxy problem… Do you have any solutions? or can you point me in the right direction to get this taken care of? I really like what I see!

    Thanks Dan

  5. September 17th, 2007 at 9:32 am (Comment)
    FooLsKi Says:

    Thank you! Finally a working weather desklet :)

  6. September 24th, 2007 at 5:11 am (Comment)
    Ram Says:

    I tried your gdesklet but showed error. I am posting the error below.

    list index out of range
    /usr/lib/gdesklets/utils/ErrorFormatter.py
    37 hasattr(exc_value, “lineno”)):
    38 filename = exc_value.filename
    39 lineno = exc_value.lineno
    40 else:
    41 tbs = traceback.extract_tb(exc_tb)
    > 42 filename = tbs[-1][0]
    43 lineno = tbs[-1][1]
    44 del tbs
    45
    46 # print error message
    47 out = “\n”
    48 out += “[EXC]%s\n” % str(exc_value)

  7. September 27th, 2007 at 3:34 pm (Comment)
    Francisco Says:

    Fantastic desklet! Finally one that works =)

    Thanks.

  8. June 22nd, 2008 at 1:28 am (Comment)
    Marc Says:

    I’m playing with Ubuntu and wanted to add eye-candy. The only thing I REALLY want is weather. The existing gdesklets don’t work, and a quick Google picked your desklet up.

    I’m new to desklets, so I’m playing it be ear. It doesn’t work for me, so I’m peering at the code. Unfortunately, I can’t get the error-log to work, so I don’t really have anything to go on until I learn enough about python to get some kind of output period.

    Anyway, I just wanted to say thank you. I have more fun stuff to pick through. I am looking forward to a shiney desktop weather applet. Once I get it playing on this desktop, then I’ve got Slax and PCLinuxOS and a couple of other distros that I want go get it up and running on. This is cool.

    Oh, error on _this_ machine it same for all applets (existing wx applets or yours):
    “unknown” or “Retrieval Failed”. For all I know, it’s because Ubuntu runs it under seperate credentials or something else I have to learn enough about to guess on.

  9. June 22nd, 2008 at 7:41 pm (Comment)
    itsjustarumour Says:

    I’ve been enjoying having the Sidecandy Weather gDesklets work properly for over a year now thanks to your re-write of the sensor. So, first - thanks!! :-) However, Yahoo have recently changed the way their sensor works again so none of these gDesklets work anymore. I have managed to get the old Goodweather gDesklet working again, by replacing the relevant lines in the __init__.py as follows:

    class GoodWeatherSensor(Sensor):

    WEATHER_SOURCE = “http://xoap.weather.com/weather/local/” \
    “%(weather_code)s?cc=*=5=xoap=xoap&” \
    “par=1003832479=bb12936706a2d601″

    However, I still haven’t been able to get your re-writes of the ClearWeather ones to work. Any ideas, or can you help?

    Besy Regards,

    itsjustarumour

© 2000-2010 Technetra. All rights reserved. Contact | Terms of Use

WordPress