maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900 (https://talk.maemo.org/showthread.php?t=72398)

Alfred 2011-04-26 13:01

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
1 Attachment(s)
Hello Guys,
I've been doing a weather LockScreen. So this is as far i have it right now. I have a script, which takes care of all stuff using imagemagick. But i can't figure out which strings pulls the CURRENT temparature. As you can see, i can get the lowest and the highest for today. Any help would be appreciated.
And btw, does anybody know how to set -gravity with coordinates, not South,West,SouthWest and so on??

Edit: just to make clear, what i mean under a "string". Here is the one, which pulls the lowest Temp:
Code:

echo `grep 'forecast-icon.*http.*png' /home/user/imagemagick/ywtemp.htm | grep -o Low[:].[-0-9][-0-9]*`°C

Prozac786 2011-04-26 13:27

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Below is the entire script that the yahoo weather beecon uses, that displays high, low and current temperature. Somewhere in there is the string that you are after. I am not sure where so I pasted the whole thing. I hope this helps:




[queen-beecon-header]
version=1.000000
checksum=6074982
[queen-beecon-exported-instance]
widgetType=1
widgetVisible=1
operationalStatus=0
hideCanvas=true
hideClickCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#000000000000
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ExtBgRGB=#808080808080
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=0
beecon_eq0_BgRGB=3
beecon_eq0_ExtBgRGB=#0000ffff0000
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=315.8853503184713
widHeight=130.20127795527156
instanceTitle=YahooWeather
instanceCmd=wget --user-agent="" -q -t 1 -T 10 -O "/home/user/.queen_beecon_dir/ywtemp.htm" "http://uk.weather.yahoo.com/england/greater-london/barking-11853/" ; wget --user-agent="" -q -t 1 -T 10 -O "/home/user/.queen_beecon_dir/ywtemp.png" `grep 'forecast-icon.*http.*png' /home/user/.queen_beecon_dir/ywtemp.htm | grep -o http*[a-zA-Z0-9\\.\\-\\\\_/\\:]*.png | grep -m 1 http` | echo "<span foreground=\\"white\\" font=\\"bold 30\\">`grep 'forecast-icon.*http.*png' /home/user/.queen_beecon_dir/ywtemp.htm | grep -o yw-temp..[-0-9]\\* | grep -o temp..[-0-9]* | grep -o [-0-9][-0-9]*`</span>"°C ; echo `grep 'forecast-icon.*http.*png' /home/user/.queen_beecon_dir/ywtemp.htm | grep -o High[:].[-0-9][-0-9]*`°C ; echo `grep 'forecast-icon.*http.*png' /home/user/.queen_beecon_dir/ywtemp.htm | grep -o Low[:].[-0-9][-0-9]*`°C
rememberMe=
cmdImgFilename=;queen-beecon.png
cmdImgAngle=0
cmdImgZoom=0
cmdFgRGB=5
cmdExtFgRGB=#ffff00000000
cmdTextAngle=1
cmdVisibilityPosition=0
cmdImgVisibilityPosition=1
cmdJustify=0
cmdExtFont=Nokia Sans bold italic 14
cmdFontName=3
cmdFontSize=14
resImgFilename=ywtemp.png
resImgAngle=0
resImgZoom=25
resFgRGB=4
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=6
resImgVisibilityPosition=1
resJustify=1
resExtFont=Nokia Sans 13
resFontName=3
resFontSize=12
resWrapLongLines=false
progressAnimationFrames=0
progressAnimationTimer=4
progressAnimationPos=4
progressAnimationAtClickXY=false
progressAnimationBasename=queen-beecon-progress
updOnStartup=true
updOnClick=true
multiClick=false
updOnDesktop=false
updOnSight=false
updOnOrientation=false
delayIndex=4
customIntervalSecs=0
updNeworkPolicy=1
GPSsettings=0
updOnDBUS=0
updOnDBUSBus=0
updOnDBUSMatchRule=

Alfred 2011-04-26 13:43

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Quote:

Originally Posted by Prozac786 (Post 995561)
Below is the entire script that the yahoo weather beecon uses, that displays high, low and current temperature. Somewhere in there is the string that you are after. I am not sure where so I pasted the whole thing. I hope this helps:

Thanks, that's where i got High and low. Just can't figure out which one is for the current, tried a lot.Thanks anyway!

Prozac786 2011-04-26 14:07

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
No problem, with this script does your weather seem to be updating? Mine was, but has stopped today for some reason and I can't explain why

Alfred 2011-04-26 14:27

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
2 Attachment(s)
I got it!!!
Here is the code:
Code:

echo `grep 'forecast-icon.*http.*png' /home/user/imagemagick/ywtemp.htm  | grep -o yw-temp..[-0-9]\\* | grep -o temp..[-0-9]* | grep -o [-0-9][-0-9]*`°C| \
I didn't work before, gotta be some mispelling or smth.
Yes it does update, and actually with this code even better than with the yahoo QBW, With QBW it showed the wrong current temp, like the website does(yahoo). But now everything works great!

S****. You are not going to believe that. I wanted to make a screenshot for you. So i ran a script again with new size font now, and it showed the wrong Current Temp... SHOOOOOOT.
See the first one is with right temp 19C
second is what the website shows...

bibounefr 2011-04-26 14:50

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Quote:

Originally Posted by Alfred (Post 995588)
I got it!!!
Here is the code:
Code:

echo `grep 'forecast-icon.*http.*png' /home/user/imagemagick/ywtemp.htm  | grep -o yw-temp..[-0-9]\\* | grep -o temp..[-0-9]* | grep -o [-0-9][-0-9]*`°C| \
I didn't work before, gotta be some mispelling or smth.
Yes it does update, and actually with this code even better than with the yahoo QBW, With QBW it showed the wrong current temp, like the website does(yahoo). But now everything works great!

S****. You are not going to believe that. I wanted to make a screenshot for you. So i ran a script again with new size font now, and it showed the wrong Current Temp... SHOOOOOOT.
See the first one is with right temp 19C
second is what the website shows...




hello, how do you do LockScreen weather? thank you for your reply:)

Alfred 2011-04-26 14:52

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Well, i think i'll create a HOW TO thread tonight.

rishabsp 2011-04-26 15:15

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Is it possible to create .deb for it,if possible please create will be helpful to noobs like me..or any program that will do all this process automatically like web os game manager..

Alfred 2011-04-26 15:36

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
There is a script, that will do everything automatically. Moreover, you can let Alarmed execute it any time you want to. You will just need to have imagemagick installed and then Alarmed set to execute this script any time.

bibounefr 2011-04-26 16:48

Re: [Noob Friendly Guide] How to get HTC Style Clock/Weather Widget on N900
 
Quote:

Originally Posted by Alfred (Post 995605)
Well, i think i'll create a HOW TO thread tonight.


great, thank you, I await it with impatience:):)


All times are GMT. The time now is 21:31.

vBulletin® Version 3.8.8