From 46bb5e6d43f39dd2604e1ee115f4e460a0d02b2f Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Sun, 3 Mar 2024 15:41:56 +0800 Subject: [PATCH 1/2] feat: add relaton-doi blog post, fixes #61 --- _posts/2022-12-28-relaton-doi.adoc | 377 +++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 _posts/2022-12-28-relaton-doi.adoc diff --git a/_posts/2022-12-28-relaton-doi.adoc b/_posts/2022-12-28-relaton-doi.adoc new file mode 100644 index 0000000..71cf6f6 --- /dev/null +++ b/_posts/2022-12-28-relaton-doi.adoc @@ -0,0 +1,377 @@ +--- +layout: post +title: Support for DOI bibliographic information auto-fetch through CrossRef +date: 2022-12-28 +categories: relaton +authors: + - + name: Nick Nicholas + email: nick.nicholas@ribose.com + social_links: + - https://github.com/opoudjis + - + name: Andrei Kislichenko + email: andrew2net@gmail.com + social_links: + - https://github.com/andrew2net + +excerpt: >- + Relaton now supports auto-fetching Crossref bibliographic information via DOI + identifiers. +--- + +== Introduction + +=== Digital Object Identifier and the DOI system + +Since 1997, the https://www.doi.org[Digital Object Identifier (DOI)] service has +been part of the essential infrastructure of digital publishing, registering and +managing a unique identifier (DOI identifier) for all publications. + +The DOI identifier scheme was ratified as an ISO standard as ISO 26324, with the +actual implementation managed by the DOI Foundation, which delegates +registration matters to DOI registration agencies. DOI identifiers are lodged +with a DOI registration agency. + +As publishers and agencies have embraced the DOI, these identifiers have become +ubiquitous, and have been adopted not only for most new publications, whether +electronic or hardcopy, but increasingly for past publications as well, +especially as those publications are reissued online. + +One of the main advantages to a widely used identifier for publications is that +value-added services can use that identifier to provide information about the +publication. + +=== Crossref + +Among a wide range of online services that operate on the DOI identifier, +https://www.crossref.org[Crossref] is of particular interest in the data it +collects and offers in the topic of bibliography. + +Crossref, now a DOI registration agency, was originally established by a +consortium of member publishers intended to facilitate stable cross-references +(hence, "cross-ref") and citations across academic journal articles. + +Therefore it is in the interests of Crossref, not only to register DOIs +for publications, and use them in online publication, but also to associate +those DOIs with bibliographic information that can be used in citations. + +As a result, Crossref has one of the largest online bibliographic databases in +existence, counting more than 141 million records today. + +NOTE: It is worth noting that out of the millions of DOI identifiers, +*still only a fraction* of them have bibliographic information on Crossref. So +if Crossref doesn't return information for a particular DOI identifier, don't +fret. + +=== Crossref bibliographic API + +Crossref has made this database publicly available +in recent years through an +https://www.crossref.org/documentation/retrieve-metadata/rest-api/[API], +and is committed to making citation information openly available. + +The Crossref API data is natively in a Crossref JSON Schema, but it can readily +be exported into popular bibliographic export formats. + +In fact, a search on the Crossref home page for DOI `10.1515/9783110889406.257` +returns +https://search.crossref.org/?from_ui=yes&q=10.1515/9783110889406.257[on its landing page] +links not only to the +https://api.crossref.org/v1/works/10.1515/9783110889406.257[Native Crossref JSON record] +and the +https://www.degruyter.com/document/doi/10.1515/9783110889406.257/html[URI of the associated resource], +but also exports of the JSON record (via Javascript, as "Cite"), both +machine-readable (BibTeX, RIS), and as human-readable renderings (APA, Harvard, +MLA, Vancouver, Chicago). + + +== Relaton integration with Crossref + +Relaton-DOI (the https://github.com/relaton/relaton-doi/[relaton-doi] gem) +integrates the Crossref bibliographic database through the Crossref API, and +Crossref bibliographic records are now available to the Relaton ecosystem. + +In the following examples, we show the method of access to a Crossref +bibliographic record given its DOI identifier, and how to use it in your chosen +environment. + +We also outline some of the enhancements we have brought to Crossref data, and +some of the caveats to bear in mind while using it. + + +== Fetching Crossref data from Relaton CLI + +Like all Relaton gems, a reference can be fetched from `relaton-doi` through the +https://github.com/relaton/relaton-cli/[Relaton CLI]. + +.Install Relaton-DOI at the command line +[source,console] +---- +$ gem install relaton-cli +---- + +.Fetching bibliographic data using a DOI identifier in Relaton XML format +[source,console] +---- +$ relaton fetch doi:10.1515/9783110889406.257 +# returns record for 10.1515/9783110889406.257 in Relaton XML +---- + +.Fetching bibliographic data using a DOI identifier in Relaton YAML format +[source,console] +---- +$ relaton fetch doi:10.1515/9783110889406.257 -f yaml +# returns record for 10.1515/9783110889406.257 in Relaton YAML +---- + +.Fetching bibliographic data using a DOI identifier in BibTeX format +[source,console] +---- +$ relaton fetch doi:10.1515/9783110889406.257 -f bibtex +# returns record for 10.1515/9783110889406.257 in Bibtex +---- + +As with any command line tool, the output of these commands can be redirected to +a text file and stored. + +The command line tool consumes identifiers from a range of sources, and it +requires `doi:` to be prefixed to each DOI, so they can be recognized as such. + +So, if you wish to build up a BibTeX database of bibliographic entries given some DOIs, you +might write a shell script to loop through the DOIs, and write each BibTeX object fetched into a file, +like this: + +.bash script using Relaton to fetch Crossref data using DOI identifiers into a BibTeX file +[source,sh] +---- +#!/bin/bash +StringVal="10.1515/9783110889406.257 10.6028/nist.ir.8245 doi:10.1215/9781478007609-047" +echo "" > my.bibtex +for doi in $StringVal; do + relaton fetch doi:$doi -f bibtex >> my.bibtex +done +---- + +== Ruby + +The `relaton-doi` gem can be used natively in your Ruby code, although this +presupposes that you are already coding within the relaton Ruby ecosystem. + +The received objects will be native Relaton objects, which will eventually need +to be exported to XML, YAML, or BibTeX. + +.Ruby code that fetches Relaton bibliographic objects using DOI identifiers +[source,ruby] +---- +> require 'relaton_doi' +=> true + +# get NIST standard +> RelatonDoi::Crossref.get "doi:10.6028/nist.ir.8245" +[relaton-doi] ["doi:10.6028/nist.ir.8245"] fetching... +[relaton-doi] ["doi:10.6028/nist.ir.8245"] found 10.6028/nist.ir.8245 +=> # Date: Sun, 3 Mar 2024 15:46:11 +0800 Subject: [PATCH 2/2] chore: add link to DOI ISO standards --- _posts/2022-12-28-relaton-doi.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_posts/2022-12-28-relaton-doi.adoc b/_posts/2022-12-28-relaton-doi.adoc index 71cf6f6..5a35c62 100644 --- a/_posts/2022-12-28-relaton-doi.adoc +++ b/_posts/2022-12-28-relaton-doi.adoc @@ -28,7 +28,9 @@ Since 1997, the https://www.doi.org[Digital Object Identifier (DOI)] service has been part of the essential infrastructure of digital publishing, registering and managing a unique identifier (DOI identifier) for all publications. -The DOI identifier scheme was ratified as an ISO standard as ISO 26324, with the +The DOI identifier scheme was ratified as an ISO standard as ISO 26324 +(https://www.iso.org/standard/43506.html[ISO 26324:2012], +https://www.iso.org/standard/81599.html[ISO 26324:2022]), with the actual implementation managed by the DOI Foundation, which delegates registration matters to DOI registration agencies. DOI identifiers are lodged with a DOI registration agency.