PK]48Hj parts.xml True True True PK484  strings.xml , and, Bad configuration. City : Condition : Current weather at degrees Celsius . degrees Fahrenheit. About Accept Author Cancel Current Current location Delay (sec) Description Set Localization Set Remote Report Tomorrow's forecast Update Version Parameters Weather forecast gadget for Tux Droid. Specify your location in the settings window. Disable/enable the option for tomorrow's forecast and the degrees can be set to Fahrenheit or Celsius. en Weather Ryan8k Temperature : , temperature, , the temperature will be between, Tomorrows weather PK48/g settings.xml 0.0.0 False True True True False en_US 4 True True 60 4 132 3 Brussels True False PK48j about.xml remi.jocaille@c2me.be Weather forecast gadget for Tux Droid. bradbase has edited it 2007-01-20; Fixed error in celsius for tomorrow weather. Added humidity reading for today weather. tuxdroid@bradbase.net Weather 0.0.5 PK]48Pictures/Icons/gadget.pngPNG  IHDRp ntEXtSoftwareAdobe ImageReadyqe<IDATxb? 0140? @X2sA\\*$A9{3?ho=  tG @؈7tW}p#Px",h1yZ\+P:_z@WmU!¬@ ?̵=06=o - Vn'(K\xݝSe9 "ӂ X ؀S-]WGO  5 V0H3r<6c)Y AgPg `PCȟc06Vd6={I;CjXb C@@!PH^@]! KD zϞ=A&c. {gf1fP3m4/_ǏxD`~hY _Pb>k$Lkkk"0ñ Îc` 齪 .f˿ @ɠ2qV fŋ`6HҥK> "|.8sg^ֿ@[ q Dm2f" GrʞI~ @$OŅ$EQ#57pr2 H ~cʒTvHk!l@IENDB`PK]486Scripts/Python/notify.pypdef notify_checker(): if _me.gui('widget').showed(): _me.gui('widget').window.update() def notify_actuator(): pass PK]48'T((Scripts/Python/main.pypdef update_informations(): import xml.dom.minidom from xml.dom.minidom import Node import tdrss lang = _me.string('lang') city = _me.get_param('city') _me.set_param('last_state', []) url = "http://www.google.com/ig/api?hl=%s&weather=%s" % (lang, city) ret, rss_str = tdrss.rss_read_url(url, 2) if not ret: return u=unicode(rss_str,"iso-8859-1") text_to_send=u.encode('utf-8','replace') doc = xml.dom.minidom.parseString(text_to_send) weather_node = doc.getElementsByTagName("weather")[0] for node in weather_node.getElementsByTagName("current_conditions"): c_c = {} condition = node.getElementsByTagName("condition")[0].getAttribute('data') temp_f = node.getElementsByTagName("temp_f")[0].getAttribute('data') temp_c = node.getElementsByTagName("temp_c")[0].getAttribute('data') humidity = node.getElementsByTagName("humidity")[0].getAttribute('data') wind_condition = node.getElementsByTagName("wind_condition")[0].getAttribute('data') c_c['condition'] = condition c_c['condition'] = c_c['condition'].encode('latin1','replace') c_c['temp_f'] = temp_f c_c['temp_f'] = c_c['temp_f'].encode('latin1','replace') c_c['temp_c'] = temp_c c_c['temp_c'] = c_c['temp_c'].encode('latin1','replace') c_c['humidity'] = humidity c_c['humidity'] = c_c['humidity'].encode('utf-8','replace') c_c['wind_condition'] = wind_condition c_c['wind_condition'] = c_c['wind_condition'].encode('utf-8','replace') _me.get_param('last_state').append(c_c) for node in weather_node.getElementsByTagName("forecast_conditions"): f_c = {} low_temp = node.getElementsByTagName("low")[0].getAttribute('data') high_temp = node.getElementsByTagName("high")[0].getAttribute('data') day_of_week = node.getElementsByTagName("day_of_week")[0].getAttribute('data') condition = node.getElementsByTagName("condition")[0].getAttribute('data') f_c['condition'] = condition f_c['condition'] = f_c['condition'].encode('latin1','replace') f_c['day_of_week'] = day_of_week f_c['day_of_week'] = f_c['day_of_week'].encode('latin1','replace') f_c['low_temp'] = low_temp f_c['low_temp'] = f_c['low_temp'].encode('latin1','replace') f_c['high_temp'] = high_temp f_c['high_temp'] = f_c['high_temp'].encode('latin1','replace') _me.get_param('last_state').append(f_c) def speak_weather(): _me.update_informations() weather_list = _me.get_param('last_state') if len(weather_list) == 0: tux.tts.select_voice(_me.get_var('speaker'), _me.get_var('pitch')) tux.tts.speak(_me.string('bad_conf')) return if _me.get_param('degrees_celcius') == True: text = _me.string('current_weather')\ + _me.get_param('city') + ". "\ + weather_list[0]['condition']\ + _me.string('temperature')\ + weather_list[0]['temp_c']\ + _me.string('degrees_c')\ + weather_list[0]['humidity']\ + _me.string('%') else: text = _me.string('current_weather')\ + _me.get_param('city')\ + ". "\ + weather_list[0]['condition']\ + _me.string('temperature')\ + weather_list[0]['temp_f']\ + _me.string('degrees_f')\ + weather_list[0]['humidity']\ + _me.string('%') tux.tts.select_voice(_me.get_var('speaker'), _me.get_var('pitch')) tux.tts.speak(text) if _me.get_param('read_tommorow'): if _me.get_param('degrees_celcius') == True: celcius_low = int(((float(weather_list[1]['low_temp']) - 32) / 9) * 5) celcius_high = int(((float(weather_list[1]['high_temp']) - 32) / 9) * 5) text = _me.string('tommorow_weather') + ". "\ + weather_list[1]['condition']\ + _me.string('temperatures')\ + "%s" % celcius_low\ + _me.string('and')\ + "%s" % celcius_high\ + _me.string('degrees_c') else: text = _me.string('tommorow_weather') + ". "\ + weather_list[1]['condition']\ + _me.string('temperatures')\ + weather_list[1]['low_temp']\ + _me.string('and')\ + weather_list[1]['high_temp']\ + _me.string('degrees_f') tux.tts.select_voice(_me.get_var('speaker'), _me.get_var('pitch')) tux.tts.speak(text) def on_k_stop(): tux.tts.stop() tux.event.on_remote_bt[K_STOP] = on_k_stop speak_weather() PK]48Scripts/Python/init.pypPK]48s!Scripts/Python/GUI/conf/other.pypbindtextdomain("params", "") class Window(SimpleGladeApp): def __init__(self, path=_me.paths['root'] + '/Scripts/Python/GUI/conf/other.glade', root="window1", domain="params", **kwargs): """ Constructor """ SimpleGladeApp.__init__(self, path, root, domain, **kwargs) def new(self): """ On new window """ self.updates_commons() self.updates_specifics() self.get_widget("checkbutton1").set_active(_me.get_param('read_tommorow')) if _me.get_param('degrees_celcius'): self.get_widget("radiobutton1").set_active(True) else: self.get_widget("radiobutton2").set_active(True) def updates_commons(self): """ Update common widgets """ # Window title txt = "%s : %s" % (_me.string('name_to_read'), _me.string('gui_conf_window_title')) self.get_widget("window1").set_title(txt) # Remote Frame txt = _me.string('gui_conf_remote_title') self.get_widget("label11").set_text(txt) txt = "%s : None" % _me.string('gui_conf_current_bind_lb') self.get_widget("label_remote").set_text(txt) txt = _me.string('gui_conf_remote_set_bt') self.get_widget("button_remote").set_label(txt) # Update Frame txt = _me.string('gui_conf_update_title') self.get_widget("label12").set_text(txt) txt = "%s : " % _me.string('gui_conf_delay_lb') self.get_widget("label13").set_text(txt) value = _me.get_var('notify_delay') self.get_widget("delay_spinbutton").set_value(value) # Bottom buttons txt = _me.string('gui_conf_cancel_bt') self.get_widget("label6").set_text(txt) txt = _me.string('gui_conf_accept_bt') self.get_widget("label5").set_text(txt) def updates_specifics(self): # Localization frame txt = _me.string('gui_conf_localization_title') self.get_widget("label1").set_text(txt) txt = "%s : " % _me.string('gui_conf_current_location_lb') self.get_widget("label3").set_text(txt) self.get_widget("entry1").set_text(_me.get_param('city')) txt = _me.string('gui_conf_localization_set_bt') self.get_widget("button1").set_label(txt) # Report frame txt = _me.string('gui_conf_report_title') self.get_widget("label2").set_text(txt) txt = _me.string('gui_conf_tommorow_cb') self.get_widget("checkbutton1").set_label(txt) def on_button_remote_clicked(self, widget, *args): """ On button 'set' remote clicked """ def remote_set_caption(): tux.sys.wait(0.1) gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) if gadgets.has_key('Manager'): if not gadgets['Manager'].gui('remote').showed(): gadgets['Manager'].gui('remote').show() gadget_thread.start_new_thread(remote_set_caption, ()) def on_set_clicked(self, widget, *args): """ On button 'set' clicked """ _me.set_param('city', self.get_widget("entry1").get_text()) def on_accept_clicked(self, widget, *args): """ On button 'accept' clicked """ _me.set_var('notify_delay', int(self.get_widget("delay_spinbutton").get_value())) _me.set_param('read_tommorow', self.get_widget("checkbutton1").get_active()) _me.set_param('degrees_celcius', self.get_widget("radiobutton1").get_active()) if _me.gui('widget').showed(): _me.gui('widget').window.update() self.get_widget("window1").destroy() def on_cancel_clicked(self, widget, *args): """ On button 'cancel' clicked """ self.get_widget("window1").destroy() PK]48`;`;`#Scripts/Python/GUI/conf/other.glade 314 True Weather report parameters GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 5 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 62 27 True True Set True GTK_RELIEF_NORMAL True 256 0 328 24 True Current : None False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 0 True <b>Remote</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 5 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 120 24 True True 1 0 False GTK_UPDATE_ALWAYS False False 1 1 3600 1 10 10 88 0 336 24 True Delay (sec) : False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 0 True <b>Updates</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 5 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 248 25 True True True True 0 True False 0 16 62 27 True True Set True GTK_RELIEF_NORMAL True 255 14 152 16 True Current location: False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 0 True <b>Localization</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 5 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 95 22 True True Celsius True GTK_RELIEF_NORMAL True False False True 0 24 128 22 True True Fahrenheit True GTK_RELIEF_NORMAL True False False True radiobutton1 104 24 208 24 True True Tomorrow's forecast True GTK_RELIEF_NORMAL True False False True 0 0 True <b>Report</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 96 32 True True GTK_RELIEF_NORMAL True True 0.5 0.5 0 0 0 0 0 0 True False 2 True gtk-ok 4 0.5 0.5 0 0 0 False False True Accept True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 256 0 96 32 True True GTK_RELIEF_NORMAL True True 0.5 0.5 0 0 0 0 0 0 True False 2 True gtk-cancel 4 0.5 0.5 0 0 0 False False True Cancel True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 152 0 0 True True PK]48aQ:#Scripts/Python/GUI/widget/other.pypbindtextdomain("params", "") class Window(SimpleGladeApp): def __init__(self, path=_me.paths['root'] + '/Scripts/Python/GUI/widget/other.glade', root="window1", domain="params", **kwargs): SimpleGladeApp.__init__(self, path, root, domain, **kwargs) def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) gadget_thread.start_new_thread(self.update, ()) def update(self): _me.update_informations() if _me.get_param('last_state') != None: if _me.get_param('last_state') != []: w = _me.get_param('last_state') city = _me.string('city_label') + _me.get_param('city') condition = _me.string('condition_label') + w[0]['condition'] if _me.get_param('degrees_celcius') == True: temp = _me.string('temp_label') + w[0]['temp_c'] + '°c' else: temp = _me.string('temp_label') + w[0]['temp_f'] + '°f' humidity = w[0]['humidity'] wind = w[0]['wind_condition'] else: return self.get_widget("label2").set_text(city) self.get_widget("label3").set_text(condition) self.get_widget("label4").set_text(temp) self.get_widget("label5").set_text(humidity) self.get_widget("label6").set_text(wind) PK]48(updd%Scripts/Python/GUI/widget/other.glade True Weather forcast GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True 0 0.5 GTK_SHADOW_IN True 0.5 0.5 1 1 0 0 12 0 True 192 16 True ... False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 8 192 16 True ... False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 104 192 16 True ... False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 80 192 16 True ... False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 56 256 16 True ... False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 32 True <b></b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item PK48s  Strings/fr_ALL.xml , et, Mauvaise configuration. Ville : Condition : Voici la météo actuelle à degrés Celsius. degrés Fahrenheit. A propos Valider Auteur Annuler Assignation Endroit courant Délai (sec) Description Set Localisation Set Télécommande Rapport Météo pour demain Mise à jour Version Paramètres Gadget de prévisions météo pour Tux droid. Spécifiez votre région dans la partie paramètres. Cochez/Décochez l'option de prévisions pour le lendemain. Vous pouvez choisir entre la mesure Fahrenheit ou Celsius. fr Météo Bruno8k Température : , température, , la température sera comprise entre, Voici les prévisions pour demain PK]48Hj parts.xmlPK484  strings.xmlPK48/g settings.xmlPK48j about.xmlPK]48Pictures/Icons/gadget.pngPK]486Scripts/Python/notify.pypPK]48'T((Scripts/Python/main.pypPK]487'Scripts/Python/init.pypPK]48s!l'Scripts/Python/GUI/conf/other.pypPK]48`;`;`#7Scripts/Python/GUI/conf/other.gladePK]48aQ:#Scripts/Python/GUI/widget/other.pypPK]48(updd%!Scripts/Python/GUI/widget/other.gladePK48s  ȼStrings/fr_ALL.xmlPK }