1- = ruby-oai
2-
3- == DESCRIPTION
4-
5- ruby-oai is a Open Archives Protocol for Metadata Harvesting (OAI-PMH[http://openarchives.org])
6- library for Ruby. If you're not familiar with OAI-PMH[http://openarchives.org] it is the most used
7- protocol for sharing metadata between digital library repositories.
8-
9- The OAI-PMH[http://openarchives.org] spec defines six verbs (Identify, ListIdentifiers, ListRecords,
1+ ``` _ _
2+ _ __ _ _| |__ _ _ ___ __ _(_)
3+ | '__| | | | '_ \| | | |_____ / _ \ / _` | |
4+ | | | |_| | |_) | |_| |_____| (_) | (_| | |
5+ |_| \__,_|_.__/ \__, | \___/ \__,_|_|
6+ |___/
7+ ```
8+
9+ ruby-oai is a Open Archives Protocol for Metadata Harvesting (OAI-PMH)
10+ library for Ruby. OAI-PMH[ http://openarchives.org ] it is a somewhat
11+ archaic protocol for sharing metadata between digital library repositories.
12+ If you are looking to share metadata on the web you are probably better off
13+ using a feed format like RSS or Atom. If have to work with a backwards
14+ digital repository that only offers OAI-PMH access then ruby-oai is your
15+ friend.
16+
17+ The [ OAI-PMH] ( http://openarchives.org ) spec defines six verbs (Identify, ListIdentifiers, ListRecords,
1018GetRecords, ListSets, ListMetadataFormat) used for discovery and sharing of
1119metadata.
1220
1321The ruby-oai gem includes a client library, a server/provider library and
1422a interactive harvesting shell.
1523
16- === client
24+ Client
25+ ------
1726
1827The OAI client library is used for harvesting metadata from repositories.
1928For example to initiate a ListRecords request to pubmed you can:
2029
30+ ``` ruby
2131 require ' oai'
2232 client = OAI ::Client .new ' http://www.pubmedcentral.gov/oai/oai.cgi'
2333 for record in client.list_records
2434 puts record.metadata
2535 end
36+ ```
2637
2738See OAI::Client for more details
2839
29- === provider
40+ Server
41+ ------
3042
31- The OAI provider library handles serving local content to other clients.
32-
33- Setting up a simple provider:
43+ The OAI provider library handles serving local content to other clients. Here's how to set up a simple provider:
3444
45+ ``` ruby
3546 class MyProvider < Oai ::Provider
3647 repository_name ' My little OAI provider'
3748 repository_url ' http://localhost/provider'
3849 record_prefix ' oai:localhost'
3950 admin_email ' root@localhost' # String or Array
4051 source_model MyModel .new # Subclass of OAI::Provider::Model
4152 end
53+ ```
4254
4355See OAI::Provider for more details
4456
45- === interactive harvester
57+ Interactive Harvester
58+ ---------------------
4659
4760The OAI-PMH[ http://openarchives.org ] client shell allows OAI Harvesting to be configured in
4861an interactive manner. Typing 'oai' on the command line starts the
@@ -53,7 +66,8 @@ operations.
5366
5467See OAI::Harvester::Shell for more details
5568
56- == INSTALLATION
69+ Installation
70+ ------------
5771
5872Normally the best way to install oai is from rubyforge using the gem
5973command line tool:
@@ -68,14 +82,15 @@ So you'll need to:
6882
6983Where x.y.z is the version of the gem that was generated.
7084
71- == TODO
85+ License
86+ -------
87+
88+ [ Public Domain] ( http://creativecommons.org/publicdomain/zero/1.0/ )
7289
73- * consolidate response classes used by provider and client
74- * automatic validation of metadata schemas
75- * email the authors with your suggestions
90+ Authors
91+ -------
7692
77- == AUTHORS
93+ * Ed Summers < ehs@pobox.com >
94+ * William Groppe <will.groppe@gmail.com >
95+ * Terry Reese <terry.reese@oregonstate.edu >
7896
79- - Ed Summers <ehs@pobox.com>
80- - William Groppe <will.groppe@gmail.com>
81- - Terry Reese <terry.reese@oregonstate.edu>
0 commit comments