View Single Post
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:
European Soccer Leagues (+World Cup 2010 & many more) Live Results and Next Matches

The Beecon will also be able to highlight the match of your favourite Team and display 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. Download zip file with icons/images attached to the thread for your convenience and extract and store images in the specified N900 directory, create it if not existing. (Warning: inside the zip file there is an image named football-icon.png.3 this is NOT an error!)







  3. Just drop them HERE:


    Let's go...

  4. As an example we'll create the Beecon relevant to the Italian Serie A Soccer League ... Exported Instance Data for Spain, Germany, France, Portugal and England can be found in following posts of this thread.

  5. 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!)
    Code:
    [queen-beecon-header]
    version=1,000000
    checksum=2892800
    [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=football-win.png
    beecon_eq1_ImgZoom=0
    beecon_eq1_BgRGB=4
    beecon_eq1_ImgFilename=football-tie.png
    beecon_ge2_ImgZoom=0
    beecon_ge2_BgRGB=5
    beecon_ge2_ImgFilename=football-lose.png
    beecon_idxge2_ImgZoom=0
    beecon_idxge2_BgRGB=11
    beecon_idxge2_ImgFilename=football-icon.png
    widWidth=265
    widHeight=210
    instanceTitle=ITA - Serie A
    instanceCmd=wget -U "" -t 1 -T 5 -q -O - 'http://m.espn.go.com/soccer/scoreboard?leagueTag=ita.1&lang=EN' | awk -v fav='Internazionale' 'BEGIN{FS="";r=3;}/^<\\/style>.+<\\/html>/{match($0,"[\\|] <b  >.+<\\/b> [\\|]");print "\\t\\t\\t\\t\\t<span foreground=\\"red\\" font=\\"bold 14\\"><i>" substr($0,RSTART+7,RLENGTH-13) "</i></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}'
    cmdImgFilename=calcio-ita.png
    cmdImgZoom=0
    cmdFgRGB=11
    cmdVisibilityPosition=1
    cmdImgVisibilityPosition=8
    cmdJustify=0
    cmdFontName=3
    cmdFontSize=14
    resImgFilename=;queen-beecon-resimg.png
    resImgZoom=0
    resFgRGB=4
    resVisibilityPosition=1
    resImgVisibilityPosition=3
    resJustify=0
    resFontName=2
    resFontSize=11
    updOnStartup=false
    updOnClick=true
    updOnDesktop=false
    delayIndex=0
    updNeworkPolicy=1
  6. Then three usual and basic steps to instantiate the Widget:





  7. Now click on the Settings Wrench Icon and we reach the Settins Dialog.

  8. Click on the "Advanced" button (1)


  9. Confirm that we are PROFESSIONALS and we know what we are doing. Button (1)


  10. We reach the Advanced Settings and Tools Dialog Box... scroll down to the bottom.


  11. We reach following screen. If we press Button (1), we paste our Exported Instance Data into the Import/Export buffer, ready to be processed.


  12. After the Import Buffer is filled with Import Data, let's click on Import Snippet/Beecon Button (1)


  13. And confirm we really want to Import our Instance


  14. SUCCESS!!! We have now imported our Exported Instance.


  15. Let's dismiss the warning and, after imported data is reloaded, we will be back at our Instance Settings Dialog Box. You'll see the new instance data [Buttons (1)(2)(3)(4))
    And we start our newly created Beecon by saving data and running with Button (5)


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='Internazionale'



  3. And replace it with our favourite Team like this:



  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 queen-beecon-euro-soccer-leagues-icons-pack.zip (325.1 KB, 408 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-03-21 at 11:33.
 

The Following 8 Users Say Thank You to No!No!No!Yes! For This Useful Post: