Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1.23 KB

README.md

File metadata and controls

54 lines (34 loc) · 1.23 KB

cite_mapper

Quick and dirty mapper of cite urns to standard abbreviations

Installation

Add this line to your application's Gemfile:

gem 'cite_mapper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cite_mapper

Usage

Run rackup to start a webserver (its port defaults to 9292).

At the moment the server will only respond to two GET methods.

If you want to know what urn:cts:greekLit:tlg0007.tlg015.perseus-eng1:16.1 means, you can ask the server

http://localhost:9292/find_cite?cite=urn%3Acts%3AgreekLit%3Atlg0007.tlg015.perseus-eng1%3A16.1

and it will respond in JSON:

{ "author" : "Plut.", "work" : "Alc.", "section" : "16.1" }

If you want to know what Xen. Cyrop. 5.3.11-17 means, you can ask the server

http://localhost:9292/find_abbr?abbr=Xen.%20Cyrop.%205.3.11-17`

and it will respond in JSON:

{"urn":"urn:cts:greekLit:tlg0032:tlg007:5.3.11-5.3.17"}

Contributing

  1. Fork it ( https://github.com/[my-github-username]/cts_mapper/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request