= RelatonIeee RelatonIeee is a Ruby gem that implements the https://github.com/relaton/relaton-model-ieee#ieee-bibliographic-item-model[IeeeBibliographicItem model]. You can use it to retrieve metadata of IEEE Standards from standards.ieee.org, and access such metadata through the `IeeeBibliographicItem` object. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-ieee' ---- And then execute: $ bundle install Or install it yourself as: $ gem install relaton-ieee == Usage === Configuration Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `RelatonIeee.configure` block. [source,ruby] ---- require 'relaton_ieee' => true RelatonIeee.configure do |config| config.logger.level = Logger::DEBUG end ---- === Search for a standard using keywords [source,ruby] ---- item = RelatonIeee::IeeeBibliography.search("IEEE 528-2019") => # " 2022-12-03 IEEE Standard for Inertial Sensor Terminology https://ieeexplore.ieee.org/document/8863799 IEEE 528-2019 ... " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavor `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " 2022-12-03 IEEE Standard for Inertial Sensor Terminology https://ieeexplore.ieee.org/document/8863799 IEEE 528-2019 ... Gyro Accelerometer Panel of the IEEE Aerospace and Electronic Systems Society ... " ---- === Get document by reference [source,ruby] ---- RelatonIeee::IeeeBibliography.get("IEEE 528-2019") [relaton-ieee] (IEEE 528-2019) fetching... [relaton-ieee] (IEEE 528-2019) found `IEEE 528-2019` => # [#, @type="src">] ---- === Create bibliographic item from XML [source,ruby] ---- RelatonIeee::XMLParser.from_xml File.read "spec/fixtures/ieee_528_2019.xml" => # {"id"=>"IEEE528-2019", ... RelatonIeee::IeeeBibliographicItem.from_hash 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 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/relaton/relaton_ieee. == License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).