Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@neilfws
Created September 1, 2009 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilfws/178883 to your computer and use it in GitHub Desktop.
Save neilfws/178883 to your computer and use it in GitHub Desktop.
Fetch field names and descriptions from NCBI GEO database
#!/usr/bin/ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
doc = Hpricot(open("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=gds"))
(doc/'//fieldlist/field').each do |f|
puts "#{(f/'/name').inner_html},#{(f/'/fullname').inner_html},#{(f/'description').inner_html}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment