Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes in dwca meta.xml generator

  • Loading branch information...
commit 46213f7cd82f4ca3957f6e65c419251711e45137 1 parent ef76ed1
@dimus dimus authored
View
2  .rvmrc
@@ -1 +1 @@
-rvm use ruby-1.9.2-p290@dwcahunter --create
+rvm use ruby-1.9.3-p194@dwcahunter --create
View
8 Gemfile
@@ -3,7 +3,7 @@ source "http://rubygems.org"
# Example:
# gem "activesupport", ">= 2.3.5"
gem "nokogiri", "~> 1.5.0"
-gem "dwc-archive", "~> 0.7.16"
+gem "dwc-archive", "~> 0.9.2"
gem "rest-client"
# gem "anystyle-parser"
@@ -12,8 +12,8 @@ gem "rest-client"
group :development do
gem "rspec", "~> 2.3.0"
gem "cucumber", ">= 0"
- gem "bundler", "~> 1.0.0"
+ gem "bundler", "~> 1.1.5"
gem "jeweler", "~> 1.6.4"
- gem "rcov", ">= 0"
- gem "ruby-debug19"
+ gem "simplecov", ">= 0"
+ gem "debugger"
end
View
60 Gemfile.lock
@@ -2,44 +2,49 @@ GEM
remote: http://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
- biodiversity19 (1.0.9)
+ biodiversity19 (1.0.15)
parallel
parallel
treetop
treetop
builder (3.0.0)
- columnize (0.3.5)
- cucumber (1.1.4)
+ columnize (0.3.6)
+ cucumber (1.2.1)
builder (>= 2.1.2)
- diff-lcs (>= 1.1.2)
- gherkin (~> 2.7.1)
+ diff-lcs (>= 1.1.3)
+ gherkin (~> 2.11.0)
json (>= 1.4.6)
- term-ansicolor (>= 1.0.6)
+ debugger (1.2.0)
+ columnize (>= 0.3.1)
+ debugger-linecache (~> 1.1.1)
+ debugger-ruby_core_source (~> 1.1.3)
+ debugger-linecache (1.1.2)
+ debugger-ruby_core_source (>= 1.1.1)
+ debugger-ruby_core_source (1.1.3)
diff-lcs (1.1.3)
- dwc-archive (0.7.16)
+ dwc-archive (0.9.2)
+ archive-tar-minitar
nokogiri (~> 1.5.0)
parsley-store (>= 0.3.0)
parsley-store (~> 0.3.0)
- gherkin (2.7.1)
+ gherkin (2.11.1)
json (>= 1.4.6)
git (1.2.5)
jeweler (1.6.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
- json (1.6.3)
- linecache19 (0.5.12)
- ruby_core_source (>= 0.1.4)
- mime-types (1.17.2)
- nokogiri (1.5.0)
- parallel (0.5.11)
+ json (1.7.4)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ nokogiri (1.5.5)
+ parallel (0.5.17)
parsley-store (0.3.0)
biodiversity19
redis
polyglot (0.3.3)
rake (0.9.2.2)
- rcov (0.9.11)
- redis (2.2.2)
+ redis (3.0.1)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.3.0)
@@ -50,17 +55,10 @@ GEM
rspec-expectations (2.3.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
- ruby-debug-base19 (0.11.25)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby_core_source (>= 0.1.4)
- ruby-debug19 (0.11.6)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby-debug-base19 (>= 0.11.19)
- ruby_core_source (0.1.5)
- archive-tar-minitar (>= 0.5.2)
- term-ansicolor (1.0.7)
+ simplecov (0.6.4)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
@@ -69,12 +67,12 @@ PLATFORMS
ruby
DEPENDENCIES
- bundler (~> 1.0.0)
+ bundler (~> 1.1.5)
cucumber
- dwc-archive (~> 0.7.16)
+ debugger
+ dwc-archive (~> 0.9.2)
jeweler (~> 1.6.4)
nokogiri (~> 1.5.0)
- rcov
rest-client
rspec (~> 2.3.0)
- ruby-debug19
+ simplecov
View
12 README.rdoc
@@ -1,6 +1,16 @@
= dwca-hunter
-Description goes here.
+DarwinCoreArchive Hunter is an application designed for reformatting publicly accessable scientific name sources into Dawrin Core Archive format (http://code.google.com/p/gbif-ecat/wiki/DwCArchive)
+
+Currently we have DWCA generators for
+
+NCBI
+ITIS
+Wikispecies
+WoRMS
+Freebase
+
+See dwca-hunter/bin/dwca-hunt.rb as a example how to use the code.
== Contributing to dwca-hunter
View
10 bin/dwca-hunt.rb
@@ -2,14 +2,14 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'dwca-hunter'
opts = { download: false, unpack: false }
-# opts = {}
+opts = {}
DwcaHunter::logger = Logger.new($stdout)
resources = [
- DwcaHunter::ResourceWikispecies.new(opts),
- DwcaHunter::ResourceFreebase.new(opts),
+ # DwcaHunter::ResourceWikispecies.new(opts),
+ # DwcaHunter::ResourceFreebase.new(opts),
DwcaHunter::ResourceITIS.new(opts),
- DwcaHunter::ResourceNCBI.new(opts),
- DwcaHunter::ResourceWoRMS.new(opts)
+ # DwcaHunter::ResourceNCBI.new(opts),
+ # DwcaHunter::ResourceWoRMS.new(opts)
]
resources.each do |r|
dh = DwcaHunter.new(r)
View
BIN  itis.tar.gz
Binary file not shown
View
2  lib/dwca-hunter/resource.rb
@@ -69,7 +69,7 @@ def generate_dwca
gen = DarwinCore::Generator.new(File.join(@download_dir, "dwca.tar.gz"))
gen.add_core(@core, 'taxa.txt')
@extensions.each_with_index do |extension, i|
- gen.add_extension(extension[:data], extension[:file_name])
+ gen.add_extension(extension[:data], extension[:file_name], true, extension[:row_type])
end
gen.add_meta_xml
gen.add_eml_xml(@eml)
View
8 lib/dwca-hunter/resource_itis.rb
@@ -173,14 +173,14 @@ def get_names
def generate_dwca
DwcaHunter::logger_write(self.object_id, "Creating DarwinCore Archive file")
@core = [["http://rs.tdwg.org/dwc/terms/taxonID",
- "http://purl.org/dc/terms/parentNameUsageID",
+ "http://rs.tdwg.org/dwc/terms/parentNameUsageID",
"http://rs.tdwg.org/dwc/terms/acceptedNameUsageID",
- "http://purl.org/dc/terms/scientificName",
+ "http://rs.tdwg.org/dwc/terms/scientificName",
"http://rs.tdwg.org/dwc/terms/taxonomicStatus",
- "http://purl.org/dc/terms/taxonRank"]]
+ "http://rs.tdwg.org/dwc/terms/taxonRank"]]
@extensions << { :data => [["http://rs.tdwg.org/dwc/terms/taxonID",
"http://rs.tdwg.org/dwc/terms/vernacularName",
- "http://purl.org/dc/terms/language"]], :file_name => "vernacular_names.txt" }
+ "http://purl.org/dc/terms/language"]], :file_name => "vernacular_names.txt", :row_type => "http://rs.gbif.org/terms/1.0/VernacularName" }
@names.keys.each_with_index do |k, i|
d = @names[k]
accepted_id = @synonyms[k] ? @synonyms[k] : nil
Please sign in to comment.
Something went wrong with that request. Please try again.