If you working in Python you can use idutils. I needed a similar capabilities in non-Python code spaces like my web browser or Deno. With Metadata Tools perform similar function server side (via Deno) and browser side, in other languages via compile to WASM or in the web browser via transpilation to JavaScript.
Metadata Tools seeks to be very portable across languages that support WASM, native binary executables and in web browsers.
import {
normalizeDOI, normalizeORCID, normalizeROR,
validateDOI, validateORCID, validateROR,
verifyDOI, verifyORCID, verifyROR,
} from "./mod.ts";
const orcid = "0000-0003-0900-6903",
verifiedORCID = await verifyORCID(orcid),
ror = "https://ror.org/00mpvse27",
verifiedROR = await verifyROR(ror),
doi = "https://doi.org/10.1128/jmbe.00128-21",
verifiedDOI = await verifyDOI(doi);
console.log(
`ORCID ${normalizeORCID(orcid)} -> is valid? ${
validateORCID(orcid)
} -> verfied? ${verifiedORCID}`,
);
console.log(
`ORCID ${normalizeROR(ror)} -> is valid? ${
validateROR(ror)
} -> verfied? ${verifiedROR}`,
);
console.log(
`ORCID ${normalizeDOI(doi)} -> is valid? ${
validateDOI(doi)
} -> verfied? ${verifiedDOI}`,
);
ORCID 0000-0003-0900-6903 -> is valid? true -> verfied? true
ORCID https://ror.org/00mpvse27 -> is valid? true -> verfied? true
ORCID 10.1128/jmbe.00128-21 -> is valid? true -> verfied? true
Metadata Tools is still at the early experimental stage. Some ideas
for future directions include targetting WASM in additional to a native
binary for mdt
cli. This would allow Metadata Tools to be
used from languages that can import and run WASM modules (e.g. Rust,
Python and Go).
Add additional identifier support as needed.