= ItuBib: retrieve ITU Standards for bibliographic use using the BibliographicItem model Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/itubib`. To experiment with that code, run `bin/console` for an interactive prompt. ItuBib is a Ruby gem that implements the https://github.com/riboseinc/isodoc-models#iso-bibliographic-item[IsoBibliographicItem model]. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'itubib' ---- And then execute: $ bundle Or install it yourself as: $ gem install itubib == Usage === Search for a standard using keywords [source,ruby] ---- require 'itubib' hit_collection = ItuBib::ItuBibliography.search("ITU-T L.163") => [<ItuBib::Hit:0x007f92b5d693c8 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T L.163 (11/2018)">, <ItuBib::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 [source,ruby] ---- 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 [source,ruby] ---- ItuBib::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/[USERNAME]/itubib. == License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).