CLI tool for creating invenio-rdm metadata records from ARCs.
resource_type
{"id":"dataset"}
per defaultcreators
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:
Person.Affiliation
title
Investigation.Title
description
Investigation.Description
publication_date
--publication-date
flagfull 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:
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>