Skip to content
Snippets Groups Projects
Commit cdc6ce5b authored by Mike Lynch's avatar Mike Lynch
Browse files

Added details to the README, bumped the version number before publishing

to npm
parent 2b724a5a
Branches
Tags v1.0.6
No related merge requests found
......@@ -2,9 +2,38 @@
Node.js utilities for building and working with DataCrates.
(Standard here: https://github.com/UTS-eResearch/datacrate)
(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.
\ No newline at end of file
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
Note that this uses the jsonld_helper library from Calcyte to trim the context,
which is another historical artefact that should go away.
const datacrate = require('datacrate').catalog;
const jsonld_h = require('calcyte').jsonld;
const datapub = get_metadata_from_rb2_somehow();
const catalog = datacrate.datapub2catalog(datapub);
jsonld_h.init(catalog);
jsonld_h.trim_context();
fs.writeFileSync('CATALOG.json', JSON.stringify(jsonld_h.json_ld, null, 2));
## 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.
Get this to call the json_ld helper module to do things like context
trimming rather than having to do this explicitly.
Do a more robust job with the geolocations field using GeoJSON-LD.
\ No newline at end of file
{
"name": "datacrate",
"version": "1.0.1",
"version": "1.0.2",
"description": "utilities for building and manipulating DataCrate data packages",
"main": "index.js",
"scripts": {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment