redbox-ro-crate

Converts a ReDBox data publication to an RO-crate

Usage no npm install needed!

<script type="module">
  import redboxRoCrate from 'https://cdn.skypack.dev/redbox-ro-crate';
</script>

README

redbox-ro-crate

Crosswalk a redbox data publication to an ro-crate-metadata.jsonld file. Forked from the old datacrate library and modified as little as possible because for now we just want to get Stash publishing ro-crates instead of datacrates.

Usage

Note that rb2rocrate is an async function

const rb2ro = require('redbox-ro-crate').rb2rocrate;
const datapub = get_metadata_from_rb2_somehow();
const jsonld = await rb2rocrate(datapub);
await fs.writeFile('ro-crate-metadata.jsonld', JSON.stringify(jsonld, null, 2));

To-do

Do a more robust job with the geolocations field using GeoJSON-LD.