Gem Version Build Status Appveyor Build Status

RelatonItu is a Ruby gem that implements the IsoBibliographicItem model.

Installation

Add this line to your application’s Gemfile:

gem 'relaton_bib'

And then execute:

$ bundle

Or install it yourself as:

$ gem install relaton_bib

Usage

Search for a standard using keywords

require 'relaton_bib'

hit_collection = RelatonItu::ItuBibliography.search("ITU-T L.163")
=> [<RelatonItu::Hit:0x007f92b5d693c8 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T L.163 (11/2018)">,
 <RelatonItu::Hit:0x007f92b5d69350 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T Z.161 (10/2018)">]
 ...

 item = hit_collection[1].fetch
 => #<IsoBibItem::IsoBibliographicItem:0x007f92b5c723c0
 ...

XML serialization

item.to_xml
=> "<bibitem type=\"international-standard\" id=\"ITU-TZ.161(10/2018)\">
      <fetched>2019-03-01</fetched>
      <title format=\"text/plain\" language=\"en\" script=\"Latn\">
        ITU-T Z.161 (10/2018): Testing and Test Control Notation version 3: TTCN-3 core language
      </title>
      ...
    </bibitem>"

Get code, and year

RelatonItu::ItuBibliography.get("ITU-T L.163", "2018", {})
fetching ITU-T L.163...
=> #<IsoBibItem::IsoBibliographicItem:0x007f92b5d8bc20
...

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to [rubygems.org](https://rubygems.org).

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/metanorma/relaton_bib.

License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).