xnn.common.models.hub.zenodo#

Resolve Zenodo DOIs and record links to downloadable files.

Accepted spellings of a Zenodo reference:

doi:10.5281/zenodo.18957344
10.5281/zenodo.18957344
https://doi.org/10.5281/zenodo.18957344
https://zenodo.org/records/18957344
https://zenodo.org/records/18957344/files/<file>     (selects that file)
zenodo:18957344

The record metadata comes from the public records API (https://zenodo.org/api/records/<id>), which also gives each file’s MD5, so every download is verified. A concept DOI (the “all versions” DOI) resolves to the latest version.

Functions

choose(record_files, filename, suffixes, recid)

Pick the model file of a record.

citation(record)

A one-line citation built from a record's metadata.

fetch_record(recid, root, *[, refresh, offline])

Return a record's metadata, caching it as <root>/record.json.

files(record)

The downloadable files of a record.

is_doi(source)

Whether source looks like a DOI of any registrant.

license_id(record)

The record's license identifier (e.g. "cc-by-4.0").

parse(source)

Recognize a Zenodo reference.