danielharan (owner)

Revisions

gist: 14898 Download_button fork
public
Public Clone URL: git://gist.github.com/14898.git
Embed All Files: show embed
extract_conservative_ca.rb #
1
2
3
4
5
Dir.glob("*").each do |pc|
  File.open(pc).read =~ /aug08cpocRidingProfileTitle>([^<]*)</
  puts "#{pc},#{$1}"
end
 
extract_elections_ca.rb #
1
2
3
4
Dir.glob("*").each do |pc|
  File.open(pc).read.split("\n").first =~ /InfovoteMain\.aspx\?L=e&ED=(\d{5})&EV/
  puts "#{pc},#{$1}"
end