= Relaton3gpp Relaton3gpp is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model]. You can use it to retrieve metadata of W3C Standards from https://w3.org, and access such metadata through the `W3cBibliographicItem` object. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-3gpp' ---- And then execute: $ bundle install Or install it yourself as: $ gem install relaton-3gpp == Usage === Search for a standard using keywords [source,ruby] ---- require 'relaton_3gpp' => true item = Relaton3gpp::Bibliography.get "3GPP TR 00.01U:UMTS/3.0.0" [relaton-3gpp] ("3GPP TR 00.01U:UMTS/3.0.0") fetching... [relaton-3gpp] ("3GPP TR 00.01U:UMTS/3.0.0") found 3GPP TR 00.01U:UMTS/3.0.0 => # " 2022-12-02 Work programme for the standardization of Universal Mobile Telecommunications System (UMTS) http://www.3gpp.org/ftp/Specs/archive/00_series/00.01U/0001U-300.zip 3GPP TR 00.01U:UMTS/3.0.0 TR 00.01U:UMTS/3.0.0 ... " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " 2022-12-02 Work programme for the standardization of Universal Mobile Telecommunications System (UMTS) http://www.3gpp.org/ftp/Specs/archive/00_series/00.01U/0001U-300.zip 3GPP TR 00.01U:UMTS/3.0.0 TR 00.01U:UMTS/3.0.0 ... TR SMG5 3G 3 3 true SMG-28 SMG-28 SMG-28 SMG-28 SP-28 1999-02-12 " ---- === Typed links Some of 3GPP documents have `src` type link. [source,ruby] ---- item.link.first.type => "src" item.link.first.content ==> # ---- === Create bibliographic item from XML [source,ruby] ---- Relaton3gpp::XMLParser.from_xml File.read('spec/fixtures/bibdata.xml') => # {"schema-version"=>"v1.2.1", "id"=>"3GPPTR00.01U-UMTS/3.0.0", ... bib_hash = Relaton3gpp::HashConverter.hash_to_bib hash => {:"schema-version"=>"v1.2.1", :id=>"3GPPTR00.01U-UMTS/3.0.0", ... Relaton3gpp::BibliographicItem.new(**bib_hash) => # nil ---- == 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 the created tag, 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/relaton/relaton_3gpp. == License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).