Created
November 17, 2014 13:33
-
-
Save dmitriy-sqrt/f68b62331d3699abf05f 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
require 'nokogiri' | |
file = File.open("/home/neox/Desktop/test") | |
doc = Nokogiri::HTML(file) | |
rows = doc.css('tbody tr') | |
rows.each do |row| | |
name = row.at_xpath('td[2]/a/text()').to_s.strip | |
description = row.at_xpath('td[3]//text()').to_s.gsub(/\s+/, ' ').strip | |
description = 'Deprecated.' if description == '' | |
#unless name.include? "BIND_" | |
#puts "'#{name}' => \"#{description}\"," | |
#end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment