Skip to content

Instantly share code, notes, and snippets.

@famulus

famulus/gist:108660

Created May 8, 2009
Embed
What would you like to do?
require 'fastercsv'
require 'google-rest'
arr_of_arrs = FasterCSV.read("/Users/famulus/Desktop/gem_download_stats.csv") # in the interest of dirty hack I just made a CSV of the data
google = GoogleSearch.new
arr_of_arrs.map do |row|
begin
result = google.search(:q => "#{row[0]} ruby gem")[0]
puts "<div style=\"margin-top:10px\">
#{row[0]}</div>
<div style=\"margin-top:5px\"><a href=\"#{result.url}\" >#{result.content}</a></div>"
rescue SyntaxError => error
rescue => exc
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.