datacrate

utilities for building and manipulating DataCrate data packages

Usage no npm install needed!

<script type="module">
  import datacrate from 'https://cdn.skypack.dev/datacrate';
</script>

README

datacrate

Node.js utilities for building and working with DataCrates.

(The DataCrate Standard is here: https://github.com/UTS-eResearch/datacrate)

This started as a library for crosswalking ReDBox 2 data publications into CATALOG.json files as part of the publication workflow. It should turn into a general-purpose toolkit which makes it easy to build things like Provisioner bots and publication pipelines.

It doesn't generate the HTML for a DataCrate - that functionality is in the Calcyte package, though in time this module might include that as a dependency.

Usage

const datacrate = require('datacrate').catalog;
const datapub = get_metadata_from_rb2_somehow();
const catalog = datacrate.datapub2catalog(datapub);
fs.writeFileSync('CATALOG.json', JSON.stringify(catalog, null, 2));

random.jshis is a utility to generate plausible random DataCrates with no payloads, for testing things like Solr indexers. It generates random text descriptions and a reasonable distribution of keywords and authors.

node ./random.js -d ./output/ -n 1000

To-do

Refactor this module so that it's a library of components which can be used to build crosswalks like datapub2catalog, and then factor the rb2-specific stuff out into its own modules.

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