![]() |
[Announce] Queen BeeCon Widget - MLB Major League Baseball Matches of the Day (+tutorial/walkthrough)
5 Attachment(s)
As promised... here's the walkthrough and tutorial to customize Queen BeeCon Widget to display near Real Time MLB Major League Baseball Matches results.
The Widget is also capable of showing different icons/images/emoticons according to the result of a Favourite Team. (My kiddo's NYY) :) In the picture there is also an example of an other customization of Queen BeeCon Widget for displaying my favourite Today's TV Serials which are aired during the day (source is TVRage.com). This will be discussed in another future thread... http://i46.tinypic.com/2iu7pfn.png Preparation Steps:
http://i43.tinypic.com/301q992.png http://i41.tinypic.com/1zmdvno.png http://i44.tinypic.com/mv2gky.png http://i43.tinypic.com/2mzgms0.png Just drop them HERE: http://i39.tinypic.com/2h7dxxu.png Let's go... Three usual and basic steps to instantiate the Widget: http://i41.tinypic.com/oan8n8.png http://i42.tinypic.com/6hlrh4.png http://i41.tinypic.com/oq92yc.png http://i42.tinypic.com/2ebualz.png Now click on the Settings Wrench Icon and we reach the Settins Dialog. 1) Make sure this is Beecon (our command's Exit Codes will be dynamically managed) 2) Command to be replaced 3) We will now create the command to be associated to the Beecon by clicking on 3. The command will fetch the MLB Results content from the internet (mobile site) and parse it. http://i44.tinypic.com/2ilh99k.png 1) Let's specify the Command Title: "MLBeeCon" 2) Let's paste our specialist fetching/parser command in this field here: In code, replace t="NYY" with t="your team here" (short form) Code:
echo "<span foreground=\"green\"><big><i>[`date +%m/%d/%Y`]</i></big></span>"; wget -t 1 -T 10 -q -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN {t="NYY";m=0;}/<td>.+<\/td>/{s=gensub(/<[^>]*>/,"","g");s=gensub(/[\t ]+/," ","g",s);split(s,a);if(a[1]!=t && a[3]!=t && a[4]!=t){print s;next;}m=1;print "<span foreground=\"cyan\"><b><big>" s "</big></b></span>";if(a[2]=="vs.") {ex=1;next;}if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5])) {ex=0;next;}if(a[5]==a[2]) {ex=1;next;} else {ex=2;next;}}END {if(m==0) {print "No\nMatch!\n";exit 1;} else exit ex;}' 1) Setup the width of our Beecon to around the background image Width 2) Same for Heigth 3,4) Help fine tuning the X,Y position of the Widget on Desktop http://i41.tinypic.com/2agrk90.png 1) We don't want any background 2) This only applies to Snippets (not our case) http://i40.tinypic.com/fvg1tt.png 1,3,5,7) Specify the images to display for the different Command's Exit Status 2,4,6,8) Specify the relevant Beecon background color (not relevant, we've hidden it in previous step) 9,10) Specify basename for images in case we want different icons/background for Command Exit Codes >=3 (not relevant now) http://i44.tinypic.com/i37xhi.png 1) This is the filename of our background image 2) Position it in the center of our widget 3,4) Font Family/Size here (This is for the command title label; the "MLBeecon..." in cyan/italics in desktop picture) 5,6,7) Visibility (Hidden/Position), Color & Justification of our label. http://i43.tinypic.com/fxuxdw.png 1) Image is not relevant here as we rely upon the Exit Status icons/images. (Trailing ";" disables image) 2) Position smileys Status icons/images at bottom right corner of our widget 3,4) Font Family/Size here (This is for default MLB Results text overridden by Pango Markup Language outputted by command) 5,6,7) Visibility (Hidden/Position), Color & Justification of our label. http://i43.tinypic.com/2l8zrjs.png 1) Update at system startup 2) When clicked 3) When desktop gains focus 4) Every 5 minutes 5) When connected to network/internet 6) We Save and Run command immediately http://i44.tinypic.com/2njhqv7.png And Here we Are!!! In next post I'll explain details about the command used for the Beecon. 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. |
Re: [Announce] Queen BeeCon Widget for MLB Major League Baseball Matches of the Day (+tutorial/walkthrough)
Just a few words to be spent about the command driving the Widget's look and behaviour:
It is basically divided in 3 parts:
|
All times are GMT. The time now is 04:10. |
vBulletin® Version 3.8.8