CLI tool for creating invenio-rdm metadata records from ARCs.
-
resource_type
- set to
{"id":"dataset"}
per default
- set to
-
creators
-
Investigation data source:
Investigation.Contacts
-
person_or_org
record:field source note type personal set per default name {Person.LastName}, {Person.FirstName}
given_name Person.FirstName
family_name Person.LastName
identifiers Person.Email
;Person.Comments
(for orcid)contains an identifier record based on person metadata. Mandatory: email. Optional: Orcid -
affiliation
list:- Investigation data source:
Person.Affiliation
- this field is an object containing only the "name" field. it can subsequently be matched to exisiting affiliations in the invenio instance.
- Investigation data source:
-
-
title
- Investigation data source:
Investigation.Title
- Investigation data source:
-
description
- Investigation data source:
Investigation.Description
- Investigation data source:
-
publication_date
- settable via
--publication-date
flag - defaults to current date
- note that this should be changed downstream to the actual date of publishing, as the current date will be the date when the pipeline runs, not necessarily the actual publication date.
- settable via
full example record:
{
"resource_type": {
"id": "dataset"
},
"creators": [
{
"person_or_org": {
"type": "personal",
"name": "LN1, FN1",
"given_name": "FN1",
"family_name": "LN1",
"identifiers": [
{
"scheme": "email",
"identifier": "yes@yes.yes"
},
{
"scheme": "orcid",
"identifier": "0000-0000-0000-0000"
}
]
},
"affiliations": [
{
"name": "Institute 1"
}
]
},
{
"person_or_org": {
"type": "personal",
"name": "LN2, FN2",
"given_name": "FN2",
"family_name": "LN2",
"identifiers": [
{
"scheme": "email",
"identifier": "yes@yes.yes"
}
]
},
"affiliations": [
{
"name": "Institute 2"
}
]
}
],
"title": "test investigation",
"description": "this is a test investigation",
"publication_date": "2023-04-25"
}
Prerequisites:
- .NET 6.0 SDK
- For building/testing the container: docker
in the repo root:
./build.cmd
or ./build.sh
in the repo root:
./build.cmd runtests
or ./build.sh runtests
in the repo root:
docker build . -t arc-to-invenio
arc-to-invenio [--help] --arc-directory <path> [--out-directory <path>] [--publication-date <publication date>]
[--format-output]
OPTIONS:
--arc-directory, -p <path>
Specify a directory that contains the arc to convert.
--out-directory, -o <path>
Optional. Specify a output directory for the invenio metadata record.
--publication-date, -pd <publication date>
Optional. ISO 8601 formatted (yyyy-MM-dd) publication date to set on the record
--format-output, -fmt Optional. Wether or not to format the output json document (e.g. use identations and
mutliline)
--help display this list of options.
The CLI tool is built and added to path inside the container, so you can either:
-
Mount a directory containing the ARC to convert into the container and specify CLI args directly, e.g.
docker run --mount type=bind,source=path/to/your/arc,target=/arc arc-to-invenio arc-to-invenio <arguments here>
-
Running conversion inside the container, e.g.
docker run -it arc-to-invenio
then - inside the container -
arc-to-invenio <arguments here>
-
or combine these approaches, e.g
docker run -it --mount type=bind,source=path/to/your/arc,target=/arc
then - inside the container -
arc-to-invenio <arguments here>