Last active
August 29, 2015 14:17
-
-
Save tirkarthi/e28f62eb562db5037634 to your computer and use it in GitHub Desktop.
Perl script for World cup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
while (1) { | |
`wget --no-proxy --quiet http://static.cricinfo.com/rss/livescores.xml -O score.txt`; | |
sleep(10); # Set to seconds | |
my $text = `cat score.txt`; | |
$text =~ m!<title>(.*India.*)</title>!; | |
my $score = $1; | |
$score = '"'.$score.'"'; | |
`notify-send -t 500 $score`; # T the time to expire the notification. currently 500 milliseconds. | |
} | |
# The bubble stays because its a bug irrespective of the expire time flag | |
# sadly no overs or player info at the moment :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment