Active Topics

 



Notices


Reply
Thread Tools
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#1
Customize Queen BeeCon Widget (>=v0.1.4) to display:
World Cup 2010 South Africa - Live Results, News and Next Matches

The Beecon will also provide the most recent WC2010 news and will be able to highlight the match of your favourite Team and display, behind mascot, a Green ball if it is winning, Yellow ball if match is tied, Red ball if team is losing, White ball if match is still not currently being played. See THIS post for more Leagues/Tournaments



Ready?!

Preparation Steps:
  1. Download and Install Queen Beecon Widget (>=v0.1.4) (Warning! It's still in extras-devel; if you like it, I need your support for testing and promoting to Testing and Extras)

  2. Save icons/images attached to the post (or Download and extract zip file attached to the thread for your convenience) and store images in the specified N900 directory, create it if not existing. (Warning: inside the zip file there could be images with numbers appended to common graphic filenames extensions - ex. football-icon.png.3 - this is NOT an error!) - Do NOT save the following images as their filename will not be correct!






  3. Just drop them HERE:


  4. Make sure you copy the following Exported Instance Data to your phone's clipboard. (Do not modify anything as it is checksum protected and modifications will invalidate checksum!)
    See HERE for tutorial
    Code:
    [queen-beecon-header]
    version=1,000000
    checksum=5353938
    [queen-beecon-exported-instance]
    widgetType=0
    operationalStatus=0
    hideCanvas=true
    snippetBgRGB=0
    beecon_lt0_ImgZoom=0
    beecon_lt0_BgRGB=2
    beecon_lt0_ImgFilename=queen-beecon-syserr.png
    beecon_eq0_ImgZoom=0
    beecon_eq0_BgRGB=3
    beecon_eq0_ImgFilename=wc2010mascotte-win.png
    beecon_eq1_ImgZoom=0
    beecon_eq1_BgRGB=4
    beecon_eq1_ImgFilename=wc2010mascotte-tie.png
    beecon_ge2_ImgZoom=0
    beecon_ge2_BgRGB=5
    beecon_ge2_ImgFilename=wc2010mascotte-lose.png
    beecon_idxge2_ImgZoom=0
    beecon_idxge2_BgRGB=11
    beecon_idxge2_ImgFilename=wc2010mascotte-undef.png
    widWidth=402
    widHeight=300
    instanceTitle=Worldcup 2010
    instanceCmd=wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/scoreboard?leagueTag=fifa.world&lang=EN' | awk -v fav='Italy' 'BEGIN{FS="";r=3;}/^<\\/style>.+<\\/html>/{match($0,"[\\|] <b  >.+<\\/b> [\\|]");print "<span foreground=\\"yellow\\" font=\\"bold 15\\"> Match<sup>es<\\/sup> on <span foreground=\\"red\\">" substr($0,RSTART+7,RLENGTH-13) "</span></span>";gsub(/(<\\/style>.+<br \\/>)|(<a[^>]*>)|(<[\\/]*div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){n=split(m[i],p,"( - )|( [0-9]+-[0-9]+ )|( vs )");if(p[2]==fav||index(p[3],fav)==1){m[i]="<span foreground=\\"green\\" font=\\"bold\\">"m[i]"</span>";if(match(m[i]," [0-9]+\\-[0-9]+ ")){split(substr(m[i],RSTART+1,RLENGTH-1),s,"[ \\-]+");if((p[2]==fav&&s[1]>s[2])||(p[3]==fav&&s[2]>s[1]))r=0;else{if(s[1]==s[2])r=1;else r=2}}}print "  "m[i];}}END{exit r}'; export es="$?"; wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/news?section=worldcup2010-index&lang=EN' | awk -v r="$es" -v dt="`date +'%x %r'`" -v oc='white' -v ec='gray' 'BEGIN{FS="";print "<span foreground=\\"cyan\\" font=\\"bold 15\\"> News <span foreground=\\"cyan\\" font=\\"bold 13\\">("dt")</span></span>"}/^<\\/style>.+<\\/html>/{gsub(/(<\\/style>.+>News<\\/div>)|(<[\\/]*a[^>]*>)|(<div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){if(i%2==0)c=oc;else c=ec;print "<span foreground=\\""c"\\"> - "m[i]"</span>"}}END{exit r}'
    cmdImgFilename=worldcup.png
    cmdImgZoom=0
    cmdFgRGB=1
    cmdVisibilityPosition=0
    cmdImgVisibilityPosition=5
    cmdJustify=0
    cmdFontName=3
    cmdFontSize=12
    resImgFilename=queen-beecon-resimg.png
    resImgZoom=0
    resFgRGB=1
    resVisibilityPosition=1
    resImgVisibilityPosition=3
    resJustify=0
    resFontName=2
    resFontSize=12
    updOnStartup=false
    updOnClick=true
    updOnDesktop=false
    delayIndex=0
    updNeworkPolicy=1
  5. Proceed with the import of the "Exported Instance Data" according to the following instructions:
    Import Procedure for Beecon Exported Instance Data

And Here we Are!!! But there is one more thing we need to do: Let's change our favourite Team!!!
  1. Let's start the Main Settings Dialog Box Again and click on the "Edit Cmd" button


  2. Let's scroll the command code until we find the following string:

    ... awk -v fav='Italy'

  3. And replace it with our favourite Team

  4. Save changed command with relevant button and "Save and Run" in next dialog!

Have Fun!!!

Data is made available on the internet and is freely accessible also through a normal browser by pointing to m.espn.go.com. Credits go to the cited Companies, Organizations, Product, Services. Please report if any contents is neither appropriate nor allowed to be published and it will be removed within short time span.
Attached Files
File Type: zip 2010-worldcup-images.zip (130.2 KB, 145 views)
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-06-14 at 08:10.
 

The Following 14 Users Say Thank You to No!No!No!Yes! For This Useful Post:
Posts: 54 | Thanked: 6 times | Joined on Jun 2010
#2
Hello, i got the problem here.
I got the image on the screen. But when i press on the Beecon icon to update information, nothing is done.
I got nothing , just the sentence on top of the Beecon Image "News (06/12/10 02:24pm)
I changed the fv team to Germany.
Darn..they had very great match.
 
Posts: 40 | Thanked: 4 times | Joined on Dec 2009 @ Germany
#3
Originally Posted by knownothing View Post
Hello, i got the problem here.
I got the image on the screen. But when i press on the Beecon icon to update information, nothing is done.
I got nothing , just the sentence on top of the Beecon Image "News (06/12/10 02:24pm)
I changed the fv team to Germany.
Darn..they had very great match.
Same happens to me...
I changed my fav team also to Germany. Furthermore it says "Image not found" (on the top right). So i had a look at your code and wondered:
"beecon_idxge2_ImgFilename=wc2010mascotte-undef.png"
But there isn't such a file in your image package. Therefore I changed the line to "beecon_idxge2_ImgFilename=wc2010mascotte.undef.pn g.3"
and the error still occurs. Any idea?

Greetings napo
//PS: lol i don't write any " " in "png"

Last edited by el^napo; 2010-06-13 at 22:02.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#4
Originally Posted by knownothing View Post
Hello, i got the problem here.
I got the image on the screen. But when i press on the Beecon icon to update information, nothing is done.
I got nothing , just the sentence on top of the Beecon Image "News (06/12/10 02:24pm)
I changed the fv team to Germany.
Darn..they had very great match.
Hi ... I just imported and tested this beecon right now and it works like charm ...



Please goto advanced dialog box as per HERE and post here an exported instance of you not-working beecon.
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#5
Originally Posted by el^napo View Post
Same happens to me...
I changed my fav team also to Germany. Furthermore it says "Image not found" (on the top right). So i had a look at your code and wondered:
"beecon_idxge2_ImgFilename=wc2010mascotte-undef.png"
But there isn't such a file in your image package. Therefore I changed the line to "beecon_idxge2_ImgFilename=wc2010mascotte.undef.pn g.3"
and the error still occurs. Any idea?

Greetings napo
//PS: lol i don't write any " " in "png"
It is not correct to change the wc2010mascotte.undef.png.3... that's the right name.

wc2010mascotte-undef.png is just a basename to which the beecon exit status gets appended in order to load different images according to different exit-codes.

And I also got it working when changing fav team to Germany
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 40 | Thanked: 4 times | Joined on Dec 2009 @ Germany
#6
hi,
so let's go:
[queen-beecon-header]
version=1,000000
checksum=7216270
[queen-beecon-exported-instance]
widgetType=0
widgetVisible=1
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#ffffffffffff
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=wc2010mascotte-win.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=wc2010mascotte-tie.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=wc2010mascotte-lose.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=wc2010mascotte-undef.png
widWidth=402
widHeight=300
instanceTitle=Worldcup 2010
instanceCmd=wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/scoreboard?leagueTag=fifa.world&lang=EN' | awk -v fav='Italy' 'BEGIN{FS="";r=3;}/^<\\/style>.+<\\/html>/{match($0,"[\\|] <b >.+<\\/b> [\\|]");print "<span foreground=\\"yellow\\" font=\\"bold 15\\"> Match<sup>es<\\/sup> on <span foreground=\\"red\\">" substr($0,RSTART+7,RLENGTH-13) "</span></span>";gsub(/(<\\/style>.+<br \\/>)|(<a[^>]*>)|(<[\\/]*div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){n=split(m[i],p,"( - )|( [0-9]+-[0-9]+ )|( vs )");if(p[2]==fav||index(p[3],fav)==1){m[i]="<span foreground=\\"green\\" font=\\"bold\\">"m[i]"</span>";if(match(m[i]," [0-9]+\\-[0-9]+ ")){split(substr(m[i],RSTART+1,RLENGTH-1),s,"[ \\-]+");if((p[2]==fav&&s[1]>s[2])||(p[3]==fav&&s[2]>s[1]))r=0;else{if(s[1]==s[2])r=1;else r=2}}}print " "m[i];}}END{exit r}'; export es="$?"; wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/news?section=worldcup2010-index&lang=EN' | awk -v r="$es" -v dt="`date +'%x %r'`" -v oc='white' -v ec='gray' 'BEGIN{FS="";print "<span foreground=\\"cyan\\" font=\\"bold 15\\"> News <span foreground=\\"cyan\\" font=\\"bold 13\\">("dt")</span></span>"}/^<\\/style>.+<\\/html>/{gsub(/(<\\/style>.+>News<\\/div>)|(<[\\/]*a[^>]*>)|(<div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){if(i%2==0)c=oc;else c=ec;print "<span foreground=\\""c"\\"> - "m[i]"</span>"}}END{exit r}'
cmdImgFilename=worldcup.png
cmdImgZoom=0
cmdFgRGB=1
cmdExtFgRGB=#ffffffffffff
cmdTextAngle=0
cmdVisibilityPosition=0
cmdImgVisibilityPosition=5
cmdJustify=0
cmdExtFont=Nokia Sans bold italic 12
cmdFontName=3
cmdFontSize=12
resImgFilename=queen-beecon-resimg.png
resImgZoom=0
resFgRGB=1
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=1
resImgVisibilityPosition=3
resJustify=0
resExtFont=Nokia Sans bold 12
resFontName=2
resFontSize=12
updOnStartup=false
updOnClick=true
updOnDesktop=false
delayIndex=0
customIntervalSecs=0
updNeworkPolicy=1
this time i didnt change anything and it's not working.

greets napo
Attached Images
 

Last edited by el^napo; 2010-06-13 at 22:28.
 
Posts: 150 | Thanked: 80 times | Joined on Dec 2009
#7
Do you have Wget installed?
 

The Following User Says Thank You to Sash For This Useful Post:
Posts: 40 | Thanked: 4 times | Joined on Dec 2009 @ Germany
#8
hey,

Originally Posted by Sash View Post
Do you have Wget installed?
nice idea...
*ashamed*
thanks for your help and beecon

greets

Last edited by el^napo; 2010-06-13 at 22:59. Reason: quote added
 
Posts: 54 | Thanked: 6 times | Joined on Jun 2010
#9
Hi ... I just imported and tested this beecon right now and it works like charm ...
I did check it two time before i send this export Instance Script. I used test Drive command, and i got this output:
Exit code 3
<sp

And this is my Export Instance script:
[queen-beecon-header]
version=1.000000
checksum=7216278
[queen-beecon-exported-instance]
widgetType=0
widgetVisible=1
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#ffffffffffff
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=wc2010mascotte-win.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=wc2010mascotte-tie.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=wc2010mascotte-lose.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=wc2010mascotte-undef.png
widWidth=402
widHeight=359
instanceTitle=Worldcup 2010
instanceCmd=wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/scoreboard?leagueTag=fifa.world&lang=EN' | awk -v fav='Italy' 'BEGIN{FS="";r=3;}/^<\\/style>.+<\\/html>/{match($0,"[\\|] <b >.+<\\/b> [\\|]");print "<span foreground=\\"yellow\\" font=\\"bold 15\\"> Match<sup>es<\\/sup> on <span foreground=\\"red\\">" substr($0,RSTART+7,RLENGTH-13) "</span></span>";gsub(/(<\\/style>.+<br \\/>)|(<a[^>]*>)|(<[\\/]*div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){n=split(m[i],p,"( - )|( [0-9]+-[0-9]+ )|( vs )");if(p[2]==fav||index(p[3],fav)==1){m[i]="<span foreground=\\"green\\" font=\\"bold\\">"m[i]"</span>";if(match(m[i]," [0-9]+\\-[0-9]+ ")){split(substr(m[i],RSTART+1,RLENGTH-1),s,"[ \\-]+");if((p[2]==fav&&s[1]>s[2])||(p[3]==fav&&s[2]>s[1]))r=0;else{if(s[1]==s[2])r=1;else r=2}}}print " "m[i];}}END{exit r}'; export es="$?"; wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/news?section=worldcup2010-index&lang=EN' | awk -v r="$es" -v dt="`date +'%x %r'`" -v oc='white' -v ec='gray' 'BEGIN{FS="";print "<span foreground=\\"cyan\\" font=\\"bold 15\\"> News <span foreground=\\"cyan\\" font=\\"bold 13\\">("dt")</span></span>"}/^<\\/style>.+<\\/html>/{gsub(/(<\\/style>.+>News<\\/div>)|(<[\\/]*a[^>]*>)|(<div[^>]*>)|(<div class="sec.+$)/,"",$0);x=split($0,m,"(<[^>]*>)");for(i=1;i<x;i++){if(i%2==0)c=oc;else c=ec;print "<span foreground=\\""c"\\"> - "m[i]"</span>"}}END{exit r}'
cmdImgFilename=worldcup.png
cmdImgZoom=0
cmdFgRGB=1
cmdExtFgRGB=#ffffffffffff
cmdTextAngle=0
cmdVisibilityPosition=0
cmdImgVisibilityPosition=5
cmdJustify=0
cmdExtFont=Nokia Sans bold italic 12
cmdFontName=3
cmdFontSize=12
resImgFilename=queen-beecon-resimg.png
resImgZoom=0
resFgRGB=1
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=1
resImgVisibilityPosition=3
resJustify=0
resExtFont=Nokia Sans bold 12
resFontName=2
resFontSize=12
updOnStartup=false
updOnClick=true
updOnDesktop=false
delayIndex=0
customIntervalSecs=0
updNeworkPolicy=1
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#10
Originally Posted by knownothing View Post
I did check it two time before i send this export Instance Script. I used test Drive command, and i got this output:
Exit code 3
<sp

And this is my Export Instance script:
Hi, I get a "Bad Checksum" warning with your export ... have you changed something manually in the text?
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:56.