Weather forecast in Skin Infobar
Hello to all
As title says forecast in Skin Infobar, I have a question has anyone right renderer and converter and xml
For any tips and help thank you in advance
![Foto](https://forums.openpli.org/uploads/profile/photo-41043.png?_r=1384496177)
Weather forecast in Skin Infobar
Begonnen door: honda-civic, 21 mei 2013 07:36
Er zijn 44 reacties in dit onderwerp
Re: Weather forecast in Skin Infobar #2
Geplaatst op 21 mei 2013 - 14:36
you have to work whit 3 tricks:
1-YWeather.py (convert)
for exmp temp = Temperature
<widget source="session.CurrentService" render="Label" position="312,588" size="120,50" zPosition="2" font="Regular; 40" halign="center" backgroundColor="background" transparent="1" foregroundColor="darkdark"> <convert type="YWeather">temp</convert> </widget>
2-piconuni.py (render)
manly used to show the forecast picon (in piconYWeather) folder
<widget source="session.CurrentService" render="PiconUni" path="piconYWeather" position="1015,552" size="100,94" zPosition="2" alphatest="blend"> <convert type="YWeather">picon</convert> </widget>
3-yweather.xml
auto_generate in /tmp
and to read city or country we use (yweather.py)
for line in open("/tmp/yweather.xml"): if line.find("<yweather:location") > -1: xweather['ycity'] = line.split('city')[1].split('"')[1] xweather['ycountry'] = line.split('country')[1].split('"')[1]
good luck to build a very nice skin
Re: Weather forecast in Skin Infobar #3
Re: Weather forecast in Skin Infobar #4
Re: Weather forecast in Skin Infobar #5
Geplaatst op 21 mei 2013 - 22:50
the code to put city in skin is
<widget source="session.CurrentService" render="Label" position="312,588" size="120,50" zPosition="2" font="Regular; 40" halign="center" backgroundColor="background" transparent="1" foregroundColor="darkdark"> <convert type="YWeather">city</convert> </widget>
Re: Weather forecast in Skin Infobar #6
Re: Weather forecast in Skin Infobar #7
Re: Weather forecast in Skin Infobar #8
Re: Weather forecast in Skin Infobar #9
Re: Weather forecast in Skin Infobar #10
Re: Weather forecast in Skin Infobar #11
Re: Weather forecast in Skin Infobar #12
Re: Weather forecast in Skin Infobar #13
Re: Weather forecast in Skin Infobar #14
Re: Weather forecast in Skin Infobar #15
Re: Weather forecast in Skin Infobar #16
Re: Weather forecast in Skin Infobar #17
Re: Weather forecast in Skin Infobar #18
Re: Weather forecast in Skin Infobar #19
Re: Weather forecast in Skin Infobar #20
Geplaatst op 31 mei 2013 - 17:18
Is this oke?? I have my Picons in usr/share/enigma2/piconYWeather
def findPicon(self, serviceName):
searchPaths = []
if fileExists("/proc/mounts"):
for line in open("/proc/mounts"):
if line.find("/dev/sd") > -1:
searchPaths.append(line.split()[1].replace('\\040', ' ') + "/%s/")
searchPaths.append("/usr/share/enigma2/%s/")
for path in searchPaths:
pngname = (((path % self.path) + serviceName) + '.png')
if fileExists(pngname):
return pngname
return ''
def findPicon(self, serviceName):
searchPaths = []
if fileExists("/proc/mounts"):
for line in open("/proc/mounts"):
if line.find("/dev/sd") > -1:
searchPaths.append(line.split()[1].replace('\\040', ' ') + "/%s/")
searchPaths.append("/usr/share/enigma2/%s/")
for path in searchPaths:
pngname = (((path % self.path) + serviceName) + '.png')
if fileExists(pngname):
return pngname
return ''
1 gebruiker(s) lezen dit onderwerp
0 leden, 1 bezoekers, 0 anonieme gebruikers