#!/usr/bin/env ruby # encoding: UTF-8 require File.expand_path(File.dirname(__FILE__) + '/../config/boot') require 'druid-tools' require 'optparse' require 'json' require 'uri' puts "" puts "" @@g = GeoHydra::Gazetteer.new @@g.each {|k| gk = @@g.find_placename(k) id = @@g.find_id(k) lc = @@g.find_loc_keyword(k) puts "" if k == gk puts "" else puts "" end puts "" unless lc.nil? href = URI.encode_www_form("f[geographic_facet][]" => lc.strip, # "q" => "\"#{lc}\"", # general search for phrase # "search_field" => "subject_terms" ) puts "" else puts "" end puts "" } puts "
KeyPlacename (GeoNames)LOC Subject (SearchWorks)
#{k}#{k}#{gk} rdf#{lc}
"