@@ -2,16 +2,16 @@ ruby-oai
22========
33
44ruby-oai is a Open Archives Protocol for Metadata Harvesting (OAI-PMH)
5- library for Ruby. [ OAI-PMH] ( http://openarchives.org ) is a somewhat
6- archaic protocol for sharing metadata between digital library repositories.
5+ library for Ruby. [ OAI-PMH] ( http://openarchives.org ) is a somewhat
6+ archaic protocol for sharing metadata between digital library repositories.
77If you are looking to share metadata on the web you are probably better off
8- using a feed format like [ RSS] ( http://www.rssboard.org/rss-specification ) or
9- [ Atom] ( http://www.atomenabled.org/ ) . If have to work with a backwards
10- digital repository that only offers OAI-PMH access then ruby-oai is your
8+ using a feed format like [ RSS] ( http://www.rssboard.org/rss-specification ) or
9+ [ Atom] ( http://www.atomenabled.org/ ) . If have to work with a backwards
10+ digital repository that only offers OAI-PMH access then ruby-oai is your
1111friend.
1212
13- The [ OAI-PMH] ( http://openarchives.org ) spec defines six verbs
14- (` Identify ` , ` ListIdentifiers ` , ` ListRecords ` ,
13+ The [ OAI-PMH] ( http://openarchives.org ) spec defines six verbs
14+ (` Identify ` , ` ListIdentifiers ` , ` ListRecords ` ,
1515` GetRecords ` , ` ListSets ` , ` ListMetadataFormat ` ) used for discovery and sharing of
1616metadata.
1717
@@ -21,15 +21,15 @@ a interactive harvesting shell.
2121Client
2222------
2323
24- The OAI client library is used for harvesting metadata from repositories.
24+ The OAI client library is used for harvesting metadata from repositories.
2525For example to initiate a ListRecords request to pubmed you can:
2626
2727``` ruby
2828 require ' oai'
2929 client = OAI ::Client .new ' http://www.pubmedcentral.gov/oai/oai.cgi' , :headers => { " From" => " oai@example.com" }
3030 response = client.list_records
3131 # Get the first page of records
32- response.each do |record |
32+ response.each do |record |
3333 puts record.metadata
3434 end
3535 # Get the second page of records
@@ -81,6 +81,15 @@ Alternately it can be installed globally using RubyGems:
8181
8282 $ gem install oai
8383
84+ Running tests
85+ -------------
86+
87+ Tests are with Test::Unit, in a somewhat archaic/legacy style. Test setup especially is not how we would do things today. Run all tests with:
88+
89+ $ bundle exec rake test
90+
91+ There are also convenience tasks to run subsets of tests.
92+
8493License
8594-------
8695
0 commit comments