Created
December 1, 2008 23:33
-
-
Save bkerley/30897 to your computer and use it in GitHub Desktop.
This file contains 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
proc twitgrep q { | |
set page [wget http://search.twitter.com/search.atom?q=$q]; | |
set titles [regexp -all -inline {<title>(.*?)</title>} $page]; | |
set names [regexp -all -inline {<uri>(.*?)</uri>} $page]; | |
set i 3; | |
set j 1; | |
set x "cocks"; | |
while {$x ne ""} { | |
set x [lindex $titles $i]; | |
set n [lindex $names $j]; | |
lappend out "[bold]$n[bold] $x"; | |
incr i 2; | |
incr j 2; | |
} | |
html [join $out "\n"] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment