= RelatonBipm: retrieve BIPM Standards for bibliographic use using the BibliographicItem model image:https://img.shields.io/gem/v/relaton-bipm.svg["Gem Version", link="https://rubygems.org/gems/relaton-bipm"] image:https://github.com/relaton/relaton-bipm/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-bipm/actions?workflow=macos"] image:https://github.com/relaton/relaton-bipm/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-bipm/actions?workflow=windows"] image:https://github.com/relaton/relaton-bipm/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-bipm/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-bipm/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-bipm"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-bipm.svg["Pull Requests", link="https://github.com/relaton/relaton-bipm/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-bipm/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-bipm/releases"] RelatonIec 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 BIPM Standards from https://www.bipm.org, and access such metadata through the `BipmBibliographicItem` object. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-bipm' ---- And then execute: $ bundle install Or install it yourself as: $ gem install relaton-bipm == Usage === Search for a standard using keywords [source,ruby] ---- require 'relaton_bipm' => true # get BIPM brochure item = RelatonBipm::BipmBibliography.get "BIPM si-brochure" [relaton-bipm] ("BIPM si-brochure") fetching... [relaton-bipm] ("BIPM si-brochure") found si-brochure => # # # # " 2021-01-10 The International System of Units (SI) Le Système international d’unités (SI) si-brochure 2019-05-20 9 The BIPM and the Metre Convention Le BIPM et la Convention du Mètre 2019 Bureau International des ponds et mesures BIPM " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " 2021-01-10 The International System of Units (SI) Le Système international d’unités (SI) https://www.bipm.org/en/publications/si-brochure si-brochure 2019-05-20 9 The BIPM and the Metre Convention Le BIPM et la Convention du Mètre 2019 Bureau International des ponds et mesures BIPM brochure " ---- === Typed links Each BIPM document has `src` type link and optional `doi` type link. [source,ruby] ---- bib.link => [#, @type="src">, #, @type="doi">] ---- === Create bibliographic item from XML [source,ruby] ---- RelatonBipm::XMLParser.from_xml File.read('spec/fixtures/bipm_item.xml') => # {"id"=>"Draft-Agenda-NMI-Dir-Meeting-2017-v10", ... RelatonBipm::BipmBibliographicItem.from_hash hash => #