Skip to main content

Module doi_utils

Module doi_utils 

Source
Expand description

Utilities for working with DOIs

This module provides functionality for:

  • Validating, normalizing and escaping DOIs
  • Encoding and decoding DOI identifiers
  • Checking DOI registration status
  • Working with DOI prefixes and registration agencies
  • Generating DOIs for specific blogging platforms like WordPress and Substack

Functions§

decode_doi
Decodes a DOI suffix to an integer
doi_resolver
Returns a DOI resolver for a given DOI
encode_doi
Encodes a DOI with a randomly generated suffix
encode_doi_suffix
Percent-encode characters that are valid in DOI suffixes but forbidden unencoded in RFC 3986 URI paths. Covers brackets used by legacy schemes (e.g. SICI – Serial Item and Contribution Identifier, NISO Z39.56) and angle brackets used as structural delimiters in SICI suffixes such as 10.1206/0003-0090(2003)277<0001:TSSAAA>2.0.CO;2.
escape_doi
Escapes a DOI, i.e. replaces ‘/’ with ‘%2F’
get_doi_ra_sync
Look up the registration agency for a DOI prefix (blocking).
is_registered_doi
Checks if a DOI resolves (i.e. redirects) via the DOI handle servers
normalize_doi
Normalizes a DOI
prefix_from_url
Extracts DOI prefix from URL
validate_doi
Validates a DOI
validate_prefix
Validates a DOI prefix for a given DOI