NYULibraries / primo-endpoint

Metadata aggregator serving json to populate primo
http://52.204.195.130/
Apache License 2.0
1 stars 1 forks source link
blacklight crosswalk dspace json metadata

Primo Endpoint

Build Status

Configurable metadata aggregator and crosswalk for NYU Libraries collections designed to populate Primo. Can run as a web server and dynamically update document cache.

Production

> docker build -t primo-endpoint .
> docker run -p 80 primo-endpoint

Logs to stdout by default. Startup can be optimized by persisting the /cache volume.

Development

Installation

> curl -sSL https://get.haskellstack.org/ | sh
> stack install

Usage:

Usage: primo-endpoint [OPTION...]
  -c FILE   --config=FILE        Load configuration from FILE [config.yml]
  -a FILE   --auth=FILE          Load auth rules from FILE [auth.yml]
  -C DIR    --cache=DIR          Use DIR for cache files [$XDR_CACHE_DIR/primo-endpoint]
  -f        --force              Force an initial update of all collections
  -o[DEST]  --output[=DEST]      Write JSON output to file [-]
  -w[PORT]  --web-server[=PORT]  Run a web server on PORT [80] to serve the result
  -l        --log-access         Log access to stdout
  -v        --verbose            Log collection refreshes to stdout

Config

The configuration is read from a YAML (or JSON) file with the following structure:

See config.yml for an example.

Sources

Each collection can have one of the following source values to specify the endpoint to pull from:

Fields

Field definitions are made up of the following:

There are two special input fields added to every source document:

Reference data:

Required fields for primo