Project:ZenodoDocumentation
From MaRDI portal
Overview
The Zenodo importer retrieves metadata for Zenodo items in json format using the API, parses them, and upload them to the MaRDI portal.
Execution
Execute the import.py script in the scripts folder:
python3import.py --mode zenodo
The importer can be run with one or more of the following optional arguments:
- communities: List[str] : a list of zenodo community IDs
- resourceTypes: List[str]: a list of zenodo resource types (check here https://help.zenodo.org/guides/search/ for valid values)
- orcid_id_file: str: path to a file contianing information about the authors. must contain a column ‘orcid’
- customQ: str: see here https://help.zenodo.org/guides/search/ how to build a custom query
The arguments can currently directly be modified from the import.py script as parameters to the function ZenodoSource()
!!!! note: is it better to have these as a config file passed as a parameter to the importer script or is it fine to add the params inside the import script
Updating code
to modify a zenodo resource (eg. add/modify properties): modify the code in
/mardi_importer/mardi_importer/publications/ZenodoResource.py
to change how queries to the zenodo API are run, modify the code in