Code Repository: https://github.com/gsu-library/datacite-bulk-doi-creator
Forked From: https://github.com/UNLV-Libraries/metadata-workflows
Author: Matt Brooks mbrooks34@gsu.edu
Date Created: 2022-03-28
License: MIT
Version: 1.1.0
A python script that bulk creates DataCite DOIs from a provided CSV file. DOIs are created in the findable state. If you are looking for the PHP version of this script see DataCite Bulk DOI Creator WebApp.
For more information about DOIs please see DataCite's support page and/or resources from their homepage. Information on their metadata schemas is also available.
Rename the config.sample.py file to config.py and fill in your DOI prefix, username (repository ID), and password. If wanting to test the script out with the test DataCite API replace the URL with the API test URL (https://api.test.datacite.org/dois) and credentials.
The headers.csv file provides an example of all valid headers this script accepts (also see CSV Fields below). Only one set of creator fields are required per record.
Run the python script upload-csv.py. When starting, it will ask you to provide a file name to process. The file path will be relative to the folder the python script is run from (unless a leading slash is used). When finished an upload report will be generated.
title - title of publication
year - publication year
type - resource type
description - abstract description
creator{n} - full name (header example: creator1, creator2, etc.)
creator{n}_type - Personal or Organizational
creator{n}_given - given name
creator{n}_family - family name
publisher - publisher
source - URL reference to resource
context_key - DOI suffix
If an error occurs a verbose message will be logged in the upload report. For more information on error codes please see DataCite's API error code page.
The original code was created by Scotty Carlson and adapted by Kelsey George for UNLV Library.