Cricket Script To Get Score From Cricinfo

###############
score.awk file
###############
#!/bin/sh
#
# Desktop Ticker
#
# dependencies —
# 1) links (‘lynx’ can also be used with slight modification in the script)
# 2) kdialog (comes with kde. script can be modified to use ‘xosd’, which will make it workable on any machine running X)
# 3) score.awk (awk file responsible parsing. contents of the file is pasted below the script)
#
#
# Instructions to use —
# 2) In ‘url’ variable only thing which is to be changed is the number before ‘.html’. The match number of currently running match can be obtained from

http://www.cricinfo.com

url=”http://content-ind.cricinfo.com/wc2007/engine/match/247464.html?view=scorecard;wrappertype=mainframe

while [ 1 ]
do
links -enable-javascript 0 -dump $url > dump
info=`cat dump | awk -f score.awk | tail -3`
kdialog –passivepopup “$info” 30
#echo “$info” > dump
#osd_cat -f -adobe-times-medium-r-normal-*-20-*-*-*-p-*-iso8859-1 -s 1 -o 30 -d 30 -i 0 dump
done
###############
score.awk file
###############
/innings/ {if($2 == “innings”) print $1, $2}
/not out/ {if($1 == “captain”) print $2, $3, “\t”, $6, $7, $8, $9, $10;
else if($1 == “wicket-keeper”) print $2, $3, “\t”, $6, $7, $8, $9, $10;
else print $1, $2, “\t”, $5, $6, $7, $8, $9;}
/Total/ {print $0}

Number of View :2731

Tags:

  1. #1 written by sami February 23rd, 2010 at 12:16

    The first script is cricket.sh not “score.awk”..

    RE Q
  2. #2 written by bhagwat July 2nd, 2010 at 07:29

    get live score feeds from cricinfo script

    RE Q

SetPageWidth
Content Protected Using Blog Protector By: PcDrome.

Mahol Dot Org is Stephen Fry proof thanks to caching by WP Super Cache