Changeset 7338 for ipk/source
- Timestamp:
- Apr 25, 2011, 6:20:13 PM (15 years ago)
- Location:
- ipk/source
- Files:
-
- 5 edited
-
infos_foreca/CONTROL/control (modified) (1 diff)
-
infos_foreca/CONTROL/preinst (modified) (1 diff)
-
infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py (modified) (10 diffs)
-
swapinfos_foreca/CONTROL/control (modified) (1 diff)
-
swapinfos_foreca/var/swap/extensions/Foreca/plugin.py (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ipk/source/infos_foreca/CONTROL/control
r7321 r7338 1 1 Package: enigma2-plugin-infos-foreca 2 Version: 1. 32 Version: 1.4 3 3 Architecture: sh4 4 4 OE: Weatherinfos for your AAF Duckbox -
ipk/source/infos_foreca/CONTROL/preinst
r7321 r7338 21 21 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1` 22 22 FREE=`expr $SPACE - 100` 23 SIZE= 68023 SIZE=770 24 24 echo "checking freespace" 25 25 echo packege size $SIZE kb -
ipk/source/infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py
r7321 r7338 77 77 deviceName = HardwareInfo().get_device_name() 78 78 79 80 # Make Path for Slideshow 81 if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder") is False: 82 os.system("mkdir -p /usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder") 79 83 80 84 … … 331 335 ##print "Desktop ", size, width 332 336 if width == 1024: 333 self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1. 3" backgroundColor="#b0b0b0" >"""337 self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.4" backgroundColor="#b0b0b0" >""" 334 338 self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" /> 335 339 <widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/> … … 348 352 </screen>""" 349 353 else: 350 self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1. 3" backgroundColor="#b0b0b0" >"""354 self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.4" backgroundColor="#b0b0b0" >""" 351 355 self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" /> 352 356 <widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/> … … 884 888 # ------------------------------------------------------------------- 885 889 class SatPanelList(MenuList): 886 def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 142, enableWrapAround = True): 887 MenuList.__init__(self, [], False, eListboxPythonMultiContent) 888 self.l.setFont(0, gFont("Regular", font0)) 889 self.l.setFont(1, gFont("Regular", font1)) 890 self.l.setItemHeight(itemHeight) 890 if (getDesktop(0).size().width() == 1280): 891 ItemSkin = 142 892 else: 893 ItemSkin = 122 894 895 def __init__(self, list, font0 = 28, font1 = 16, itemHeight = ItemSkin, enableWrapAround = True): 896 MenuList.__init__(self, [], False, eListboxPythonMultiContent) 897 self.l.setFont(0, gFont("Regular", font0)) 898 self.l.setFont(1, gFont("Regular", font1)) 899 self.l.setItemHeight(itemHeight) 891 900 892 901 # ------------------------------------------------------------------- … … 895 904 self.session = session 896 905 self.ort = ort 897 self.skin = """ 906 907 if (getDesktop(0).size().width() == 1280): 908 self.skin = """ 898 909 <screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525"> 899 910 <widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525" backgroundColorSelected="#565656" scrollbarMode="showOnDemand" /> 900 901 911 <eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" /> 902 912 <widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 903 913 <ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" /> 904 905 914 </screen>""" 915 else: 916 self.skin = """ 917 <screen name="SatPanel" position="center,center" size="630,440" title="Satelliten - Bilder / Karten" backgroundColor="#252525"> 918 <widget name="Mlist" position="10,10" size="600,370" zPosition="3" backgroundColor="#252525" backgroundColorSelected="#565656" scrollbarMode="showOnDemand" /> 919 <eLabel position="0,385" zPosition="2" size="630,1" backgroundColor="#c1cdc1" /> 920 <widget source="key_blue" render="Label" position="260,397" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 921 <ePixmap position="200,400" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" /> 922 </screen>""" 923 906 924 907 925 Screen.__init__(self, session) 908 926 self.Mlist = [] 909 927 910 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Satelliten Bild"), 'satellit'))) 911 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags Karte"), 'niederschlag'))) 912 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewölkung Bild"), 'bewoelkung'))) 913 #self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Karte"), 'luftdruck'))) 928 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Wetterkarte Video"), 'satellit'))) 929 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags - Video"), 'niederschlag'))) 930 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewoelkungs - Video"), 'bewoelkung'))) 931 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('eumetsat'), _("Eumetsat - Bild"), 'eumetsat'))) 932 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('metoffice'), _("Druckanalyse - Bild"), 'metoffice'))) 933 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('infrarotmetoffice'), _("Infrarot - Bild"), 'infrarotmetoffice'))) 934 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('wetterkontor'), _("Deutschland - Bild"), 'wetterkontor'))) 935 #self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Video"), 'luftdruck'))) 914 936 915 937 916 938 self.onChangedEntry = [] 917 if (getDesktop(0).size().width() == 1280): 918 self["Mlist"] = SatPanelList([]) 919 else: 920 self["Mlist"] = SatPanelList([], font0=24, font1=15, itemHeight=60) 939 self["Mlist"] = SatPanelList([]) 921 940 self["Mlist"].l.setList(self.Mlist) 922 941 self["Mlist"].selectionEnabled(1) … … 993 1012 994 1013 #------------------------------------------------------------------------------------------ 995 996 1014 if menu == "luftdruck": 997 1015 devicepath = "/tmp/sat.html" … … 1000 1018 #------------------------------------------------------------------------------------------ 1001 1019 1002 1003 # Lade Kategorie Seite und suche BildLink 1004 h = urllib.urlretrieve(url, devicepath) 1005 fd=open(devicepath) 1006 html=fd.read() 1007 fd.close() 1008 1009 fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL) 1010 PressureLink = fulltext.findall(html) 1011 PicLink = PressureLink[0] 1012 PicLink = "http://cache-" + PicLink 1013 1014 # Lade Bilder fuer Slideshow 1015 devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat" 1016 max = int(len(PressureLink))-2 1017 print "max= ", str(max) 1018 zehner = "1" 1019 x = 0 1020 while x < max: 1021 url = "http://cache-" + PressureLink[x] 1022 print str(x), url 1023 h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg") 1024 x = x + 1 1025 if x > 9: 1026 zehner = "2" 1027 1028 self.session.open(View_Slideshow, 0, True) 1020 #------------------------------------------------------------------------------------------ 1021 1022 if menu == "satellit" or menu == "niederschlag" or menu == "bewoelkung": 1023 # Lade Kategorie Seite und suche BildLink 1024 h = urllib.urlretrieve(url, devicepath) 1025 fd=open(devicepath) 1026 html=fd.read() 1027 fd.close() 1028 1029 fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL) 1030 PressureLink = fulltext.findall(html) 1031 PicLink = PressureLink[0] 1032 PicLink = "http://cache-" + PicLink 1033 1034 # Lade Bilder fuer Slideshow 1035 devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat" 1036 max = int(len(PressureLink))-2 1037 print "max= ", str(max) 1038 zehner = "1" 1039 x = 0 1040 while x < max: 1041 url = "http://cache-" + PressureLink[x] 1042 print str(x), url 1043 h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg") 1044 x = x + 1 1045 if x > 9: 1046 zehner = "2" 1047 1048 self.session.open(View_Slideshow, 0, True) 1049 1050 else: 1051 if menu == "eumetsat": 1052 devicepath = "/tmp/meteogram.png" 1053 path = "/tmp" 1054 h = urllib.urlretrieve("http://www.sat24.com/images.php?country=eu&type=zoom&format=640x480001001&rnd=118538", devicepath) 1055 filelist = devicepath 1056 self.session.open(PicView, filelist, 0, path, False) 1057 1058 if menu == "wetterkontor": 1059 devicepath = "/tmp/meteogram.png" 1060 path = "/tmp" 1061 h = urllib.urlretrieve("http://www.wetterkontor.de/maps/deutschland0.jpg", devicepath) 1062 filelist = devicepath 1063 self.session.open(PicView, filelist, 0, path, False) 1064 1065 if menu == "metoffice": 1066 devicepath = "/tmp/meteogram.png" 1067 path = "/tmp" 1068 h = urllib.urlretrieve("http://www.metoffice.gov.uk/weather/charts/FSXX00T_00.jpg", devicepath) 1069 filelist = devicepath 1070 self.session.open(PicView, filelist, 0, path, False) 1071 1072 if menu == "infrarotmetoffice": 1073 # http://www.metoffice.gov.uk/satpics/latest_IR.html 1074 devicepath = "/tmp/sat.html" 1075 url = "http://www.metoffice.gov.uk/satpics/latest_IR.html" 1076 path = "/tmp" 1077 h = urllib.urlretrieve(url, devicepath) 1078 fd=open(devicepath) 1079 html=fd.read() 1080 fd.close() 1081 1082 #http://www.metoffice.gov.uk/weather/images/eurir_sat_201104251500.jpg 1083 # <img src='/weather/images/eurir_sat_201104251500.jpg' name="sat" 1084 fulltext = re.compile(r'<img src=\'(.+?)\' name="sat"', re.DOTALL) 1085 PressureLink = fulltext.findall(html) 1086 PicLink = "http://www.metoffice.gov.uk" + PressureLink[0] 1087 print PicLink 1088 devicepath = "/tmp/meteogram.png" 1089 path = "/tmp" 1090 h = urllib.urlretrieve(PicLink, devicepath) 1091 filelist = devicepath 1092 self.session.open(PicView, filelist, 0, path, False) 1093 1029 1094 1030 1095 #------------------------------------------------------------------------------------------ 1031 1096 1032 1097 def SatEntryItem(self,entry): 1098 if (getDesktop(0).size().width() == 1280): 1099 ItemSkin = 142 1100 else: 1101 ItemSkin = 122 1102 1033 1103 rot = 16711680 1034 1104 gruen = 60928 … … 1041 1111 orange = 0xf47d19 1042 1112 grau = 0x565656 1043 1044 1113 res = [entry] 1045 1114 # return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color) 1046 res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200, 140), png=entry[0])) # png vorn1115 res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200,ItemSkin -2), png=entry[0])) # png vorn 1047 1116 res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau)) 1048 1117 return res … … 1120 1189 self.skin = "<screen position=\"0,0\" size=\"" + str(size_w) + "," + str(size_h) + "\" flags=\"wfNoBorder\" > \ 1121 1190 <eLabel position=\"0,0\" zPosition=\"0\" size=\""+ str(size_w) + "," + str(size_h) + "\" backgroundColor=\""+ self.bgcolor +"\" /><widget name=\"pic\" position=\"" + str(space) + "," + str(space) + "\" size=\"" + str(size_w-(space*2)) + "," + str(size_h-(space*2)) + "\" zPosition=\"1\" alphatest=\"on\" /> \ 1122 <widget name=\"point\" position=\""+ str(space+5) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/ Picasa/default/record.png\" alphatest=\"on\" /> \1123 <widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/ Picasa/default/ico_mp_play.png\" alphatest=\"on\" /> \1191 <widget name=\"point\" position=\""+ str(space+5) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/record.png\" alphatest=\"on\" /> \ 1192 <widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/ico_mp_play.png\" alphatest=\"on\" /> \ 1124 1193 <widget name=\"file\" position=\""+ str(space+45) + "," + str(space+8) + "\" size=\""+ str(size_w-(space*2)-50) + ",25\" font=\"Regular;20\" halign=\"left\" foregroundColor=\"" + self.textcolor + "\" zPosition=\"2\" noWrap=\"1\" transparent=\"1\" /></screen>" 1125 1194 Screen.__init__(self, session) … … 1217 1286 1218 1287 def slidePic(self): 1219 print "[ Picasa] slide to next Picture index=" + str(self.lastindex)1288 print "[Foreca] slide to next Picture index=" + str(self.lastindex) 1220 1289 if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry: 1221 1290 self.PlayPause() -
ipk/source/swapinfos_foreca/CONTROL/control
r7321 r7338 1 1 Package: enigma2-plugin-swapinfos-foreca 2 Version: 1. 32 Version: 1.4 3 3 Description: Weatherinfo Plugin for Swapstick 4 4 Section: infos -
ipk/source/swapinfos_foreca/var/swap/extensions/Foreca/plugin.py
r7321 r7338 77 77 deviceName = HardwareInfo().get_device_name() 78 78 79 80 # Make Path for Slideshow 81 if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder") is False: 82 os.system("mkdir -p /usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder") 79 83 80 84 … … 331 335 ##print "Desktop ", size, width 332 336 if width == 1024: 333 self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1. 3" backgroundColor="#b0b0b0" >"""337 self.skin = """<screen position="center,65" size="880,480" title="Foreca Wetterprognose V 1.4" backgroundColor="#b0b0b0" >""" 334 338 self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" /> 335 339 <widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/> … … 348 352 </screen>""" 349 353 else: 350 self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1. 3" backgroundColor="#b0b0b0" >"""354 self.skin = """<screen position="center,center" size="890,505" title="Foreca Wetterprognose V 1.4" backgroundColor="#b0b0b0" >""" 351 355 self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" /> 352 356 <widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/> … … 884 888 # ------------------------------------------------------------------- 885 889 class SatPanelList(MenuList): 886 def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 142, enableWrapAround = True): 887 MenuList.__init__(self, [], False, eListboxPythonMultiContent) 888 self.l.setFont(0, gFont("Regular", font0)) 889 self.l.setFont(1, gFont("Regular", font1)) 890 self.l.setItemHeight(itemHeight) 890 if (getDesktop(0).size().width() == 1280): 891 ItemSkin = 142 892 else: 893 ItemSkin = 122 894 895 def __init__(self, list, font0 = 28, font1 = 16, itemHeight = ItemSkin, enableWrapAround = True): 896 MenuList.__init__(self, [], False, eListboxPythonMultiContent) 897 self.l.setFont(0, gFont("Regular", font0)) 898 self.l.setFont(1, gFont("Regular", font1)) 899 self.l.setItemHeight(itemHeight) 891 900 892 901 # ------------------------------------------------------------------- … … 895 904 self.session = session 896 905 self.ort = ort 897 self.skin = """ 906 907 if (getDesktop(0).size().width() == 1280): 908 self.skin = """ 898 909 <screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525"> 899 910 <widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525" backgroundColorSelected="#565656" scrollbarMode="showOnDemand" /> 900 901 911 <eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" /> 902 912 <widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 903 913 <ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" /> 904 905 914 </screen>""" 915 else: 916 self.skin = """ 917 <screen name="SatPanel" position="center,center" size="630,440" title="Satelliten - Bilder / Karten" backgroundColor="#252525"> 918 <widget name="Mlist" position="10,10" size="600,370" zPosition="3" backgroundColor="#252525" backgroundColorSelected="#565656" scrollbarMode="showOnDemand" /> 919 <eLabel position="0,385" zPosition="2" size="630,1" backgroundColor="#c1cdc1" /> 920 <widget source="key_blue" render="Label" position="260,397" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 921 <ePixmap position="200,400" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" /> 922 </screen>""" 923 906 924 907 925 Screen.__init__(self, session) 908 926 self.Mlist = [] 909 927 910 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Satelliten Bild"), 'satellit'))) 911 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags Karte"), 'niederschlag'))) 912 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewölkung Bild"), 'bewoelkung'))) 913 #self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Karte"), 'luftdruck'))) 928 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('satellit'), _("Wetterkarte Video"), 'satellit'))) 929 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('niederschlag'), _("Niederschlags - Video"), 'niederschlag'))) 930 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('bewoelkung'), _("Bewoelkungs - Video"), 'bewoelkung'))) 931 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('eumetsat'), _("Eumetsat - Bild"), 'eumetsat'))) 932 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('metoffice'), _("Druckanalyse - Bild"), 'metoffice'))) 933 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('infrarotmetoffice'), _("Infrarot - Bild"), 'infrarotmetoffice'))) 934 self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('wetterkontor'), _("Deutschland - Bild"), 'wetterkontor'))) 935 #self.Mlist.append(self.SatEntryItem((self.SatEntryComponent('luftdruck'), _("Luftdruck Video"), 'luftdruck'))) 914 936 915 937 916 938 self.onChangedEntry = [] 917 if (getDesktop(0).size().width() == 1280): 918 self["Mlist"] = SatPanelList([]) 919 else: 920 self["Mlist"] = SatPanelList([], font0=24, font1=15, itemHeight=60) 939 self["Mlist"] = SatPanelList([]) 921 940 self["Mlist"].l.setList(self.Mlist) 922 941 self["Mlist"].selectionEnabled(1) … … 993 1012 994 1013 #------------------------------------------------------------------------------------------ 995 996 1014 if menu == "luftdruck": 997 1015 devicepath = "/tmp/sat.html" … … 1000 1018 #------------------------------------------------------------------------------------------ 1001 1019 1002 1003 # Lade Kategorie Seite und suche BildLink 1004 h = urllib.urlretrieve(url, devicepath) 1005 fd=open(devicepath) 1006 html=fd.read() 1007 fd.close() 1008 1009 fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL) 1010 PressureLink = fulltext.findall(html) 1011 PicLink = PressureLink[0] 1012 PicLink = "http://cache-" + PicLink 1013 1014 # Lade Bilder fuer Slideshow 1015 devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat" 1016 max = int(len(PressureLink))-2 1017 print "max= ", str(max) 1018 zehner = "1" 1019 x = 0 1020 while x < max: 1021 url = "http://cache-" + PressureLink[x] 1022 print str(x), url 1023 h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg") 1024 x = x + 1 1025 if x > 9: 1026 zehner = "2" 1027 1028 self.session.open(View_Slideshow, 0, True) 1020 #------------------------------------------------------------------------------------------ 1021 1022 if menu == "satellit" or menu == "niederschlag" or menu == "bewoelkung": 1023 # Lade Kategorie Seite und suche BildLink 1024 h = urllib.urlretrieve(url, devicepath) 1025 fd=open(devicepath) 1026 html=fd.read() 1027 fd.close() 1028 1029 fulltext = re.compile(r'http://cache-(.+?) ', re.DOTALL) 1030 PressureLink = fulltext.findall(html) 1031 PicLink = PressureLink[0] 1032 PicLink = "http://cache-" + PicLink 1033 1034 # Lade Bilder fuer Slideshow 1035 devicepath = "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/bilder/sat" 1036 max = int(len(PressureLink))-2 1037 print "max= ", str(max) 1038 zehner = "1" 1039 x = 0 1040 while x < max: 1041 url = "http://cache-" + PressureLink[x] 1042 print str(x), url 1043 h = urllib.urlretrieve(url, devicepath + zehner + str(x) + ".jpg") 1044 x = x + 1 1045 if x > 9: 1046 zehner = "2" 1047 1048 self.session.open(View_Slideshow, 0, True) 1049 1050 else: 1051 if menu == "eumetsat": 1052 devicepath = "/tmp/meteogram.png" 1053 path = "/tmp" 1054 h = urllib.urlretrieve("http://www.sat24.com/images.php?country=eu&type=zoom&format=640x480001001&rnd=118538", devicepath) 1055 filelist = devicepath 1056 self.session.open(PicView, filelist, 0, path, False) 1057 1058 if menu == "wetterkontor": 1059 devicepath = "/tmp/meteogram.png" 1060 path = "/tmp" 1061 h = urllib.urlretrieve("http://www.wetterkontor.de/maps/deutschland0.jpg", devicepath) 1062 filelist = devicepath 1063 self.session.open(PicView, filelist, 0, path, False) 1064 1065 if menu == "metoffice": 1066 devicepath = "/tmp/meteogram.png" 1067 path = "/tmp" 1068 h = urllib.urlretrieve("http://www.metoffice.gov.uk/weather/charts/FSXX00T_00.jpg", devicepath) 1069 filelist = devicepath 1070 self.session.open(PicView, filelist, 0, path, False) 1071 1072 if menu == "infrarotmetoffice": 1073 # http://www.metoffice.gov.uk/satpics/latest_IR.html 1074 devicepath = "/tmp/sat.html" 1075 url = "http://www.metoffice.gov.uk/satpics/latest_IR.html" 1076 path = "/tmp" 1077 h = urllib.urlretrieve(url, devicepath) 1078 fd=open(devicepath) 1079 html=fd.read() 1080 fd.close() 1081 1082 #http://www.metoffice.gov.uk/weather/images/eurir_sat_201104251500.jpg 1083 # <img src='/weather/images/eurir_sat_201104251500.jpg' name="sat" 1084 fulltext = re.compile(r'<img src=\'(.+?)\' name="sat"', re.DOTALL) 1085 PressureLink = fulltext.findall(html) 1086 PicLink = "http://www.metoffice.gov.uk" + PressureLink[0] 1087 print PicLink 1088 devicepath = "/tmp/meteogram.png" 1089 path = "/tmp" 1090 h = urllib.urlretrieve(PicLink, devicepath) 1091 filelist = devicepath 1092 self.session.open(PicView, filelist, 0, path, False) 1093 1029 1094 1030 1095 #------------------------------------------------------------------------------------------ 1031 1096 1032 1097 def SatEntryItem(self,entry): 1098 if (getDesktop(0).size().width() == 1280): 1099 ItemSkin = 142 1100 else: 1101 ItemSkin = 122 1102 1033 1103 rot = 16711680 1034 1104 gruen = 60928 … … 1041 1111 orange = 0xf47d19 1042 1112 grau = 0x565656 1043 1044 1113 res = [entry] 1045 1114 # return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color) 1046 res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200, 140), png=entry[0])) # png vorn1115 res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200,ItemSkin -2), png=entry[0])) # png vorn 1047 1116 res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau)) 1048 1117 return res … … 1120 1189 self.skin = "<screen position=\"0,0\" size=\"" + str(size_w) + "," + str(size_h) + "\" flags=\"wfNoBorder\" > \ 1121 1190 <eLabel position=\"0,0\" zPosition=\"0\" size=\""+ str(size_w) + "," + str(size_h) + "\" backgroundColor=\""+ self.bgcolor +"\" /><widget name=\"pic\" position=\"" + str(space) + "," + str(space) + "\" size=\"" + str(size_w-(space*2)) + "," + str(size_h-(space*2)) + "\" zPosition=\"1\" alphatest=\"on\" /> \ 1122 <widget name=\"point\" position=\""+ str(space+5) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/ Picasa/default/record.png\" alphatest=\"on\" /> \1123 <widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/ Picasa/default/ico_mp_play.png\" alphatest=\"on\" /> \1191 <widget name=\"point\" position=\""+ str(space+5) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/record.png\" alphatest=\"on\" /> \ 1192 <widget name=\"play_icon\" position=\""+ str(space+25) + "," + str(space+10) + "\" size=\"20,20\" zPosition=\"2\" pixmap=\"/usr/lib/enigma2/python/Plugins/Extensions/Foreca/thumb/ico_mp_play.png\" alphatest=\"on\" /> \ 1124 1193 <widget name=\"file\" position=\""+ str(space+45) + "," + str(space+8) + "\" size=\""+ str(size_w-(space*2)-50) + ",25\" font=\"Regular;20\" halign=\"left\" foregroundColor=\"" + self.textcolor + "\" zPosition=\"2\" noWrap=\"1\" transparent=\"1\" /></screen>" 1125 1194 Screen.__init__(self, session) … … 1217 1286 1218 1287 def slidePic(self): 1219 print "[ Picasa] slide to next Picture index=" + str(self.lastindex)1288 print "[Foreca] slide to next Picture index=" + str(self.lastindex) 1220 1289 if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry: 1221 1290 self.PlayPause()
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)