Ruby gem for interacting with Zebra Z39.50 & SRU search engine.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rspec
.travis.yml
COPYING
Gemfile
README.md
Rakefile
idzebra.gemspec

README.md

Ruby bindings for IdZebra

Build Status StillMaintained Status

If you're looking for an open-source Z39.50/SRU server, then you'll probably be interested in Zebra.

From http://www.indexdata.com/zebra:

Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (eg. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries.

This gem is intended to make adding and deleting individual records from a local Zebra instance a little bit easier by taking the Zebra API and wrapping it in convenience functions.

For example:

file_data = File.open('spec/fixtures/oaipmh_test_1.xml') {|f| f.read}
IdZebra::API('spec/config/zebra.cfg') do |repo|
  # Create a new repository with the provided config
  repo.init
  # Add some records
  repo.transaction do
    repo.add_record(file_data)
  end
  repo.commit
  # Delete the records
  repo.transaction do
    repo.delete_record(file_data)
  end
  repo.commit
end

Licence

This gem is licenced under the Simplified BSD License. See COPYING for details.

It dynamically links against Zebra, which is licensed under the GPL.

Acknowledgements

This gem was produced as a result of an ANDS-funded project.