doiutils

package
v0.5.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package doiutils provides a set of functions to work with DOIs

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DOIResolver

func DOIResolver(doi string, sandbox bool) string

DOIResolver returns a DOI resolver for a given DOI

func EscapeDOI added in v0.5.27

func EscapeDOI(doi string) string

EscapeDOI escapes a DOI, i.e. replaces '/' with '%2F'

Example
package main

import (
	"fmt"

	"github.com/front-matter/commonmeta/doiutils"
)

func main() {
	s := doiutils.EscapeDOI("10.59350/k0746-rsc44")
	fmt.Println(s)
}
Output:
10.59350%2Fk0746-rsc44

func GetDOIRA

func GetDOIRA(doi string) (string, bool)

GetDOIRA returns the DOI registration agency for a given DOI or prefix

func IsRogueScholarDOI added in v0.2.14

func IsRogueScholarDOI(doi string) bool

IsRogueScholarDOI checks if a DOI is from Rogue Scholar

func NormalizeDOI

func NormalizeDOI(doi string) string

NormalizeDOI normalizes a DOI

func PrefixFromUrl

func PrefixFromUrl(str string) (string, error)

PrefixFromUrl extracts DOI prefix from URL

func ValidateDOI

func ValidateDOI(doi string) (string, bool)

ValidateDOI validates a DOI

func ValidatePrefix

func ValidatePrefix(doi string) (string, bool)

ValidatePrefix validates a DOI prefix for a given DOI

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL