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 for valid values).
- orcid_id_file: str: path to a file containing information about the authors. must contain a column ‘orcid’.
- customQ: str: see here 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: this might later bee changed so that the parameters are passed in a config file instead)
Updating code
The importer source code can be found and modified in the GitHub repository here.
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
/mardi_importer/mardi_importer/zenodo/ZenodoSource.py
- add links for these:
- How to test your changes locally
- How to run on the staging server
- How to run on the portal