Skip to main content

Crate commonmeta

Crate commonmeta 

Source
Expand description

commonmeta — a Rust port of front-matter/commonmeta.

Convert scholarly metadata between formats. The native model is Data; format modules read into it and write out of it.

Re-exports§

pub use data::Data;
pub use error::Error;
pub use error::Result;

Modules§

crockford
Generate, encode and decode random base32 identifiers. This encoder/decoder:
crossref
data
Core Commonmeta data model.
doi_utils
Utilities for working with DOIs
error
schema_utils
JSON Schema validation utilities.
traits
Reader and Writer traits for format modules.
utils
vocab
Controlled vocabularies from the commonmeta schema.

Structs§

AffiliationMatch
A single match result from the ROR affiliation API.
PushResult
The outcome of pushing a single record to InvenioRDM.

Constants§

VERSION

Functions§

convert
Read from one format and write to another in a single call.
convert_citation
Like convert, but passes CSL style and locale through to the citation writer.
match_ror_affiliation
Match a free-text affiliation string against ROR organizations using the ROR v2 affiliation endpoint.
push_inveniordm
Create-or-update, then publish, a list of records in InvenioRDM.
put_inveniordm
Create-or-update, then publish, a single record in InvenioRDM.
read
Read a single record from from format, without writing it back out.
read_parquet
Read a list of commonmeta records back from the flattened Parquet schema written by write_parquet. Lossy: only the fields captured by the flattened projection (e.g. first author, first title) are restored.
write
Write an already-loaded record to to format.
write_parquet
Write a list of commonmeta records as a single Parquet file, using a flattened, lossy tabular projection of each record’s fields.
write_ror_json
Write a ROR-derived record as raw ROR-shaped JSON (as opposed to write("ror", data), which produces InvenioRDM vocabulary YAML).