datalad catalog-translate

Synopsis

datalad catalog-translate [-h] [-c CATALOG] [--version] metadata

Description

Translate datalad-metalad-extracted metadata items into the catalog schema

The to-be-translated-to schema version is determined from the catalog, if provided, otherwise from the latest supported version of the package installation.

Translators should be provided and exposed as a datalad entry point using the group: 'datalad.metadata.translators'.

Available translators will be filtered based on own matching criteria (such as extractor name, version, etc) to find the appropriate translator, after which the translator's translation code will be executed on the metadata item.

Examples

Translate a metalad-extracted metadata item from a particular source structure into the catalog schema, assuming a dedicated translator is locally available via the entry point mechanism:

% datalad catalog-translate -c /tmp/my-cat -m path/to/metadata.jsonl

Options

metadata

The metalad-extracted metadata that is to be translated. Multiple input types are possible: - a path to a file containing JSON lines - JSON lines from STDIN - a JSON serialized string.

-h, --help, --help-np

show this help message. --help-np forcefully disables the use of a pager for displaying the help message

-c CATALOG, --catalog CATALOG

Location of an existing catalog. If this argument is provided it will determine the to-be-translated-to schema version. If the version cannot be found in the catalog, it is determined from the latest supported version of the package installation. The latter is also the default when the 'catalog' argument is not supplied.

--version

show the module and its version which provides the command

Authors

datalad is developed by DataLad Developers <team@datalad.org>.