Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Created June 19, 2010 00:26
Show Gist options
  • Save jasonm23/444417 to your computer and use it in GitHub Desktop.
Save jasonm23/444417 to your computer and use it in GitHub Desktop.
Library.find(:all, :conditions => {:host => "http://code.google.com"} ).each do |lib|
h = Hpricot(open(lib.homepage))
p = HTMLToMarkdownParser.new
p.feed((h/"#wikicontent").to_s)
lib.description = p.to_markdown
lib.update
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment