Changeset 7338 for ipk


Ignore:
Timestamp:
Apr 25, 2011, 6:20:13 PM (15 years ago)
Author:
madie
Message:

[ipk] update foreca to v1.4

Location:
ipk/source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/infos_foreca/CONTROL/control

    r7321 r7338  
    11Package: enigma2-plugin-infos-foreca
    2 Version: 1.3
     2Version: 1.4
    33Architecture: sh4
    44OE: Weatherinfos for your AAF Duckbox
  • ipk/source/infos_foreca/CONTROL/preinst

    r7321 r7338  
    2121        SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
    2222        FREE=`expr $SPACE - 100`
    23         SIZE=680
     23        SIZE=770
    2424        echo "checking freespace"
    2525        echo packege size $SIZE kb
  • ipk/source/infos_foreca/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py

    r7321 r7338  
    7777deviceName = HardwareInfo().get_device_name()
    7878
     79
     80# Make Path for Slideshow
     81if 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")
    7983
    8084
     
    331335                ##print "Desktop ", size, width
    332336                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" >"""
    334338                        self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
    335339                        <widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
     
    348352                </screen>"""
    349353                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" >"""
    351355                        self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
    352356                        <widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
     
    884888# -------------------------------------------------------------------
    885889class 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)
    891900
    892901# -------------------------------------------------------------------
     
    895904                self.session = session
    896905                self.ort = ort
    897                 self.skin = """
     906
     907                if (getDesktop(0).size().width() == 1280):
     908                        self.skin = """
    898909                        <screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525">
    899910                                <widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
    900 
    901911                                <eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" />
    902912                                <widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" />
    903913                                <ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
    904 
    905914                        </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
    906924
    907925                Screen.__init__(self, session)
    908926                self.Mlist = []
    909927
    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')))
    914936
    915937
    916938                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([])
    921940                self["Mlist"].l.setList(self.Mlist)
    922941                self["Mlist"].selectionEnabled(1)
     
    9931012
    9941013#------------------------------------------------------------------------------------------
    995                        
    9961014                if menu == "luftdruck":
    9971015                        devicepath = "/tmp/sat.html"
     
    10001018#------------------------------------------------------------------------------------------
    10011019
    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
    10291094
    10301095#------------------------------------------------------------------------------------------
    10311096
    10321097        def SatEntryItem(self,entry):
     1098                if (getDesktop(0).size().width() == 1280):
     1099                        ItemSkin = 142
     1100                else:
     1101                        ItemSkin = 122
     1102
    10331103                rot = 16711680
    10341104                gruen = 60928
     
    10411111                orange = 0xf47d19
    10421112                grau = 0x565656
    1043 
    10441113                res = [entry]
    10451114                #       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 vorn
     1115                res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200,ItemSkin -2), png=entry[0]))  # png vorn
    10471116                res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau))
    10481117                return res
     
    11201189                self.skin = "<screen position=\"0,0\" size=\"" + str(size_w) + "," + str(size_h) + "\" flags=\"wfNoBorder\" > \
    11211190                        <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\" /> \
    11241193                        <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>"
    11251194                Screen.__init__(self, session)
     
    12171286
    12181287        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)
    12201289                if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry:
    12211290                        self.PlayPause()
  • ipk/source/swapinfos_foreca/CONTROL/control

    r7321 r7338  
    11Package: enigma2-plugin-swapinfos-foreca
    2 Version: 1.3
     2Version: 1.4
    33Description: Weatherinfo Plugin for Swapstick
    44Section: infos
  • ipk/source/swapinfos_foreca/var/swap/extensions/Foreca/plugin.py

    r7321 r7338  
    7777deviceName = HardwareInfo().get_device_name()
    7878
     79
     80# Make Path for Slideshow
     81if 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")
    7983
    8084
     
    331335                ##print "Desktop ", size, width
    332336                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" >"""
    334338                        self.skin += """<widget name="MainList" position="0,65" size="880,363" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
    335339                        <widget source="Titel" render="Label" position="120,3" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
     
    348352                </screen>"""
    349353                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" >"""
    351355                        self.skin += """<widget name="MainList" position="0,90" size="890,365" zPosition="3" backgroundColor="#b0b0b0" backgroundColorSelected="#f7f7f7" selectionDisabled="1" scrollbarMode="showOnDemand" />
    352356                        <widget source="Titel" render="Label" position="120,13" zPosition="3" size="740,40" font="Regular;36" valign="center" halign="left" transparent="1" foregroundColor="#000000"/>
     
    884888# -------------------------------------------------------------------
    885889class 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)
    891900
    892901# -------------------------------------------------------------------
     
    895904                self.session = session
    896905                self.ort = ort
    897                 self.skin = """
     906
     907                if (getDesktop(0).size().width() == 1280):
     908                        self.skin = """
    898909                        <screen name="SatPanel" position="center,center" size="630,500" title="Satelliten - Bilder / Karten" backgroundColor="#252525">
    899910                                <widget name="Mlist" position="10,10" size="600,430" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
    900 
    901911                                <eLabel position="0,445" zPosition="2" size="630,1" backgroundColor="#c1cdc1" />
    902912                                <widget source="key_blue" render="Label" position="260,457" zPosition="2" size="290,30" font="Regular;20" valign="center" halign="left" transparent="1" />
    903913                                <ePixmap position="200,460" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
    904 
    905914                        </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
    906924
    907925                Screen.__init__(self, session)
    908926                self.Mlist = []
    909927
    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')))
    914936
    915937
    916938                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([])
    921940                self["Mlist"].l.setList(self.Mlist)
    922941                self["Mlist"].selectionEnabled(1)
     
    9931012
    9941013#------------------------------------------------------------------------------------------
    995                        
    9961014                if menu == "luftdruck":
    9971015                        devicepath = "/tmp/sat.html"
     
    10001018#------------------------------------------------------------------------------------------
    10011019
    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
    10291094
    10301095#------------------------------------------------------------------------------------------
    10311096
    10321097        def SatEntryItem(self,entry):
     1098                if (getDesktop(0).size().width() == 1280):
     1099                        ItemSkin = 142
     1100                else:
     1101                        ItemSkin = 122
     1102
    10331103                rot = 16711680
    10341104                gruen = 60928
     
    10411111                orange = 0xf47d19
    10421112                grau = 0x565656
    1043 
    10441113                res = [entry]
    10451114                #       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 vorn
     1115                res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(200,ItemSkin -2), png=entry[0]))  # png vorn
    10471116                res.append(MultiContentEntryText(pos=(240, 45), size=(340, 50), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau))
    10481117                return res
     
    11201189                self.skin = "<screen position=\"0,0\" size=\"" + str(size_w) + "," + str(size_h) + "\" flags=\"wfNoBorder\" > \
    11211190                        <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\" /> \
    11241193                        <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>"
    11251194                Screen.__init__(self, session)
     
    12171286
    12181287        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)
    12201289                if config.plugins.foreca.loop.value==False and self.lastindex == self.maxentry:
    12211290                        self.PlayPause()
Note: See TracChangeset for help on using the changeset viewer.