normalize_orcid#
- documenteer.citations.normalize_orcid(value)#
Reduce an ORCID URL to its bare identifier.
This is a lenient reducer, not a validator: it strips a trailing slash, keeps the last path segment, and uppercases the result. Ook owns the ORCID grammar and answers
422for anything it does not recognize, so Documenteer deliberately does not re-implement the check here and the two cannot drift.Reducing is load-bearing rather than cosmetic. The
technotepackage’sPerson.orcidvalidator re-prefixes any value that does not literally start withhttps://orcid, sotechnote.tomlyields forms such ashttps://orcid.org/http://orcid.org/0000-0003-3001-676X; every one of them reduces to the bare identifier Ook expects. It also makes a comparison of two ORCIDs insensitive to thehttp/httpsscheme and to a trailing slash.