= Relaton for IHO documents image:https://img.shields.io/gem/v/relaton-iho.svg["Gem Version", link="https://rubygems.org/gems/relaton-iho"] image:https://github.com/relaton/relaton-iho/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-iho/actions?workflow=macos"] image:https://github.com/relaton/relaton-iho/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-iho/actions?workflow=windows"] image:https://github.com/relaton/relaton-iho/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-iho/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-iho/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-iho"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-iho.svg["Pull Requests", link="https://github.com/relaton/relaton-iho/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-iho/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-iho/releases"] RelatonIho is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model]. It currently retrieves metadata of IHO Standards from https://github.com/relaton/relaton-data-iho. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-iho' ---- And then execute: [source,sh] ---- $ bundle ---- Or install it yourself as: [source,sh] ---- $ gem install relaton_iho ---- == Usage === Search for a standard using keywords [source,ruby] ---- hits = RelatonIho::IhoBibliography.search("OGC 19-025r1") => [] tem = hits[0].fetch => # " Development of Spatial Data Infrastructures for Marine Data Management Development of Spatial Data Infrastructures for Marine Data Management https://portal.opengeospatial.org/files/?artifact_id=88037 19-025r1 2019 ... " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " Development of Spatial Data Infrastructures for Marine Data Management Development of Spatial Data Infrastructures for Marine Data Management https://portal.opengeospatial.org/files/?artifact_id=88037 19-025r1 2019 ... public-engineering-report " ---- === Get code, and year [source,ruby] ---- RelatonIho::IhoBibliography.get "OGC 19-025r1", "2019", {} fetching OGC 19-025r1... => # # {"id"=>"19-025r1", ... bib_hash = RelatonIho::HashConverter.hash_to_bib hash => {:id=>"19-025r1", ... RelatonIho::IhoBibliographicItem.new bib_hash => #