diff --git a/README.md b/README.md index 82ff8e36..e9b049da 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ digital collections. * [Using an experimental version](#using-an-experimental-version) * [More info](#more-info) + ## Quality dimensions The framework measures the following features: @@ -83,8 +84,22 @@ above these there are some helper calculators: ## Running as command-line application -Go to the project https://github.com/viaacode/metadata-quality-assessment to -run this framework as a CLI. +usage: + +``` +./mqa -i -s -m + [-f ] [-h ] [-o ] [-r ] [-v ] [-w ] [-z] +``` +* `-i,--input ` Input file. +* `-s,--schema ` Schema file describing the metadata structure to run assessment against. +* `-v,--schemaFormat ` Format of schema file: json, yaml. Default: based on file extension, else json. +* `-m,--measurements ` Configuration file for measurements. +* `-w,--measurementsFormat ` Format of measurements config file: json, yaml. Default: based on file extension, else json. +* `-o,--output ` Output file. +* `-f,--outputFormat ` Format of the output: json, ndjson (new line delimited JSON), csv, csvjson (json encoded in csv; useful for RDB bulk loading). Default: ndjson. +* `-r,--recordAddress ` An XPath or JSONPath expression to separate individual records in an XML or JSON files. +* `-z,--gzip` Flag to indicate that input is gzipped. +* `-h,--headers ` Headers to copy from source ## Using the library diff --git a/mqa b/mqa new file mode 100755 index 00000000..2d439be0 --- /dev/null +++ b/mqa @@ -0,0 +1,6 @@ +#!/bin/bash +#----------------------------------------------------------------------- +# Command line interface for the Metadata Quality Assessment Framework - +#----------------------------------------------------------------------- +export VERSION=0.9.0 +java -jar $(dirname $(readlink -f $0))/target/metadata-qa-api-${VERSION}-shaded.jar $@ \ No newline at end of file diff --git a/src/main/java/de/gwdg/metadataqa/api/cli/App.java b/src/main/java/de/gwdg/metadataqa/api/cli/App.java index 47211d96..d2ecc82a 100644 --- a/src/main/java/de/gwdg/metadataqa/api/cli/App.java +++ b/src/main/java/de/gwdg/metadataqa/api/cli/App.java @@ -156,7 +156,7 @@ private static Options buildOptions() { Option inputOption = Option.builder("i") .numberOfArgs(1) - .argName("input file") + .argName("file") .required(true) .longOpt(INPUT_FILE) .desc("Input file.") @@ -164,7 +164,7 @@ private static Options buildOptions() { Option outputOption = Option.builder("o") .numberOfArgs(1) - .argName("output file") + .argName("file") .required(false) .longOpt(OUTPUT_FILE) .desc("Output file.") @@ -172,7 +172,7 @@ private static Options buildOptions() { Option outputFormatOption = Option.builder("f") .numberOfArgs(1) - .argName("output format") + .argName("format") .required(false) .longOpt(OUTPUT_FORMAT) .desc("Format of the output: json, ndjson (new line delimited JSON), csv, csvjson (json encoded in csv; useful for RDB bulk loading). Default: ndjson.") @@ -180,7 +180,7 @@ private static Options buildOptions() { Option schemaConfigOption = Option.builder("s") .numberOfArgs(1) - .argName("schema configuration") + .argName("file") .required(true) .longOpt(SCHEMA_CONFIG) .desc("Schema file to run assessment against.") @@ -188,7 +188,7 @@ private static Options buildOptions() { Option schemaFormatOption = Option.builder("v") .numberOfArgs(1) - .argName("schema format") + .argName("format") .required(false) .longOpt(SCHEMA_FORMAT) .desc("Format of schema file: json, yaml. Default: based on file extension, else json.") @@ -196,7 +196,7 @@ private static Options buildOptions() { Option measurementsConfigOption = Option.builder("m") .numberOfArgs(1) - .argName("measurement configuration") + .argName("file") .required(true) .longOpt(MEASUREMENTS_CONFIG) .desc("Configuration file for measurements.") @@ -204,7 +204,7 @@ private static Options buildOptions() { Option measurementsFormatOption = Option.builder("w") .numberOfArgs(1) - .argName("measurement format") + .argName("format") .required(false) .longOpt(MEASUREMENTS_FORMAT) .desc("Format of measurements config file: json, yaml. Default: based on file extension, else json.") @@ -226,7 +226,7 @@ private static Options buildOptions() { Option recordAddressOption = Option.builder("r") .numberOfArgs(1) - .argName("record address") + .argName("path") .required(false) .longOpt(RECORD_ADDRESS) .desc("An XPath or JSONPath expression to separate individual records in an XML or JSON files.")