diff --git a/docs/customize/vocabularies/names.md b/docs/customize/vocabularies/names.md index 2dd4647a..4aa6b100 100644 --- a/docs/customize/vocabularies/names.md +++ b/docs/customize/vocabularies/names.md @@ -120,3 +120,81 @@ invenio vocabularies import \ --vocabulary names \ --origin /path/to/ORCID_2021_10_summaries.tar.gz ``` + +### Using ORCiD Public Data Sync + +*Introduced in InvenioRDM v13* + +#### Installing Required Dependencies + +First, you should install the required `s3fs` dependency. This can be achieved by adding the following to the `Pipfile` in your instance: + +```toml +[packages] +... +invenio-vocabularies = {extras = ["s3fs"]} +... +``` + +#### Configuring ORCiD Public Data Sync + +InvenioRDM supports loading names using the ORCiD Public Data Sync. To set this up, you need to create a definition file named `names-orcid.yaml` with the following content: + +```yaml +names: + readers: + - type: orcid-data-sync + - type: xml + transformers: + - type: orcid + writers: + - type: async + args: + writer: + type: names-service + batch_size: 1000 + write_many: true +``` + +#### Customizing the Sync Interval + +Optionally, you can specify the sync interval for the orcid-data-sync reader by adding arguments. If not specified, the default sync interval is one day. The supported arguments for defining the interval are: + + • years + • months + • weeks + • days + • hours + • minutes + • seconds + • microseconds + +Here is an example of how to set a custom sync interval of 10 days: + +```yaml +names: + readers: + - type: orcid-data-sync + args: + since: + days: 10 + - type: xml + transformers: + - type: orcid + writers: + - type: async + args: + writer: + type: names-service + batch_size: 1000 + write_many: true +``` +#### Running the Import Command + +To run an import using the names-orcid.yaml file, use the vocabularies import command as shown below: + +```shell +invenio vocabularies import \ + --vocabulary names \ + --filepath ./names-orcid.yaml +```