Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

okay now make it really markdown

  • Loading branch information...
commit 0dd54bdc81425b33ab4bc9dd7daec6deb6ecda37 1 parent e6854d6
@jrochkind jrochkind authored
Showing with 31 additions and 31 deletions.
  1. +31 −31 README.md
View
62 README.md
@@ -1,6 +1,6 @@
-== openurl
+# openurl
-== DESCRIPTION
+## DESCRIPTION
openurl is a Ruby library creating, parsing and using NISO Z39.88 OpenURLs over
HTTP. <http://openurl.info/registry>
@@ -8,35 +8,35 @@ HTTP. <http://openurl.info/registry>
While openurl can send requests to OpenURL 1.0 resolvers, there is no 'standard'
response format, so parsing the returned value is up to you.
-== USAGE
+## USAGE
- require 'openurl'
-
- # Create your context object
- context_object = OpenURL::ContextObject.new
-
- # Add metadata to the Context Object Entities
- context_object.referent.set_format('journal')
- context_object.referent.add_identifier('info:doi/10.1016/j.ipm.2005.03.024')
- context_object.referent.set_metadata('issn', '0306-4573')
- context_object.referent.set_metadata('aulast', 'Bollen')
- context_object.referrer.add_identifier('info:sid/google')
+ require 'openurl'
- puts context_object.kev
-
- puts context_object.xml
+ # Create your context object
+ context_object = OpenURL::ContextObject.new
- # Send the context object to an OpenURL link resolver
- transport = OpenURL::Transport.new('http://demo.exlibrisgroup.com:9003/lr_3', context_object)
- transport.get
- puts tranport.response
+ # Add metadata to the Context Object Entities
+ context_object.referent.set_format('journal')
+ context_object.referent.add_identifier('info:doi/10.1016/j.ipm.2005.03.024')
+ context_object.referent.set_metadata('issn', '0306-4573')
+ context_object.referent.set_metadata('aulast', 'Bollen')
+ context_object.referrer.add_identifier('info:sid/google')
+
+ puts context_object.kev
- # Create a new ContextObject from an existing kev or XML serialization:
- #
- # ContextObject.new_from_kev( kev_context_object )
- # ContextObject.new_from_xml( xml_context_object ) # Can be String or REXML::Document
-
-== Ruby 1.9 and encodings
+ puts context_object.xml
+
+ # Send the context object to an OpenURL link resolver
+ transport = OpenURL::Transport.new('http://demo.exlibrisgroup.com:9003/lr_3', context_object)
+ transport.get
+ puts tranport.response
+
+ # Create a new ContextObject from an existing kev or XML serialization:
+ #
+ # ContextObject.new_from_kev( kev_context_object )
+ # ContextObject.new_from_xml( xml_context_object ) # Can be String or REXML::Document
+
+## Ruby 1.9 and encodings
Gem does run and all tests pass under ruby 1.9. There is very limited
support for handling character encodings in the proper 1.9 way.
@@ -55,17 +55,17 @@ represented as utf8 encoded yourself.
More sophisticated encoding handling can theoretically be added, but it's
somewhat non-trivial, and it's not clear anyone needs it.
-== INSTALLATION
+## INSTALLATION
You should be able to install the gem:
- gem install openurl
+ gem install openurl
The source lives in git on github:
- http://github.com/openurl/openurl
+ http://github.com/openurl/openurl
-== TESTS
+## TESTS
There are some automated tests. Run with `rake test`. They live in `./test`
and use Test::Unit.
Please sign in to comment.
Something went wrong with that request. Please try again.