Skip to main content

doi2ietf: Convert DOI metadata into BibXML

test release

Purpose

doi2ietf allows you to fetch bibliographic data from a DOI entry and convert that into IETF BibXML. IETF BibXML is the bibliographic data XML schema used by IETF RFC XML (RFC 7991)

The digital object identifier system (DOI) is specified in ISO 26324 with the Registration Authority being the International Digital Object Identifier Foundation.

The DOI registration authority allows attaching bibliographic metadata on DOI entries using the CrossRef format, available at https://data.crossref.org, and doi2ietf fetches those metadata from that site.

DOI identifiers can be resolved at the DOI resolver page.

NOTE: doilit was originally written by Carsten Bormann as part of the kramdown-rfc2629 package. The doi2ietf package provides the Python equivalent of that functionality.

Prerequisites

This software requires Python 3.6+.

All dependencies are specified in setup.py for PyPA.

Install

The package is published at PyPi and can be installed on its own.

pip install doi2ietf

Usage

Command-line interface

The doi2ietf command takes a list of arguments like this:

doi2ietf [options] [one or more DOI identifiers]

Where:

  • A DOI identifier looks like this: e.g. 10.1109/5.771073.
  • The list of DOI identifiers have to be be separated by spaces.
  • By default, the output is in YAML format, printed to STDOUT.

Options include:

  • -x or --xml: produce XML output instead of YAML.
  • -c or --cache: Cache HTTP-requests to data.crossref.org.

Example:

$ doi2ietf -c -x 10.1109/5.771073 10.1109/MIC.2012.29
<reference anchor="a"><front><title>Toward unique identifiers...
<reference anchor="b"><front><title>CoAP: An Application Protocol...

Library

The main function provided by the doi2ietf library is process_doi_list.

It can be used in the following manner, for example:

$ python
>>> import doi2ietf

>>> doi2ietf.process_doi_list(['10.1109/5.771073'])
a:
  author:
  - ins: N. Paskin
    name: N. Paskin
  date: 1999-07
  seriesinfo:
    DOI: 10.1109/5.771073
    Proceedings of the IEEE: vol. 87, no. 7, pp. 1208-1227
  title: Toward unique identifiers

>>> doi2ietf.process_doi_list(['10.1109/5.771073'], 'XML')
<reference anchor="a"><front><title>Toward unique identifiers</title>...

process_doi_list takes the following arguments:

  • list of DOI identifiers as strings
  • output format. Can be XML for XML strings, DICT for python dict objects, and YAML or None for YAML strings as default)

Development

General

Development using pyenv is strongly encouraged.

virtualenv venv
pip install -e .

Dependencies are listed inside setup.py.

Testing

Test modules are placed under the tests directory. It uses data from tests/fixtures directory. Python xmldiff module is required for this tests. It was commented out in requirements.txt.

There is 3 type of files: *.json, *.yaml and *.xml.

  • *.json - is body of HTTP(S) response from data.crossref.org
  • *.yaml - is original doilit output
  • *.xml - is original doilit output with -x=xmlhandle option

Metadata

Release files for doi2ietf 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doi2ietf 0.1.2
File Size Uploaded Provenance
doi2ietf-0.1.2.tar.gz 7.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for doi2ietf 0.1.2
File Interpreter ABI Platform
doi2ietf-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / doi2ietf-0.1.2.tar.gz

Download URL doi2ietf-0.1.2.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0d14ec9e22e54fdef0d44451b54be7d9f32d2614bd94d2450c9550cc094c3e3f
BLAKE2b-256 checksum
How to use checksums
4756ccfb0f3d8a27c44cc135d047fa8a5090141e9baf1fc0be6eb6626bd87e3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / doi2ietf-0.1.2-py3-none-any.whl

Download URL doi2ietf-0.1.2-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8180a187a6ca165c24b4919239ead12c1adf81868a249efbd1411ae0827d8a9d
BLAKE2b-256 checksum
How to use checksums
7151618dbe1f6143eee69424fbb83379e64ab691f4f3bc66196f750f74e2b25a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for doi2ietf 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page