= RelatonNist: retrieve NIST Standards for bibliographic use using the BibliographicItem model image:https://img.shields.io/gem/v/relaton-nist.svg["Gem Version", link="https://rubygems.org/gems/relaton-nist"] image:https://github.com/relaton/relaton-nist/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-nist/actions?workflow=macos"] image:https://github.com/relaton/relaton-nist/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-nist/actions?workflow=windows"] image:https://github.com/relaton/relaton-nist/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-nist/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-nist/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-nist"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-nist.svg["Pull Requests", link="https://github.com/relaton/relaton-nist/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-nist/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-nist/releases"] RelatonNist 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 NIST Standards from https://csrc.nist.gov, and access such metadata through the `IsoBibliographicItem` object. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton_nist' ---- And then execute: $ bundle Or install it yourself as: $ gem install relaton_nist == Usage === Search for a standard using keywords [source,ruby] ---- require 'relaton_nist' hit_collection = RelatonNist::NistBibliography.search("8200") => item = hit_collection[1].fetch => # " 2019-05-03 Interagency Report on Status of International Cybersecurity Standardization for the Internet of Things (IoT) ... " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " 2019-05-17 Interagency Report on Status of International Cybersecurity Standardization for the Internet of Things (IoT) ... stadard 2018-02-01 2018-04-18 " ---- === Get code, and year [source,ruby] ---- RelatonNist::NistBibliography.get("8200", "2018", {}) [relaton-nist] ("8200") fetching... [relaton-nist] ("8200") found NISTIR 8200 => # # # "SP 800-67 Rev. 3" RelatonNist::NistBibliography.get 'SP 800-38A/Add' [relaton-nist] ("SP 800-38A/Add") fetching... [relaton-nist] ("SP 800-38A/Add") found SP 800-38A-Add => # "SP 800-38A-Add" ---- === Create bibliographic item from YAML [source,ruby] ---- hash = YAML.load_file 'spec/examples/nist_bib_item.yml' => {"id"=>"NISTIR 8011 Vol. 3", ... bib_hash = RelatonNist::HashConverter.hash_to_bib hash => {:id=>"NISTIR 8011 Vol. 3", ... RelatonNist::NistBibliographicItem.new bib_hash => #