/datacite

Python3 scripts to help researchers submit valid XML documents to DataCite.

Primary LanguagePython

DataCite Repository

Python3 scripts to help researchers submit valid XML documents to DataCite to create DOIs and their metadata.

dataCiteExcelToXML.py

This script creates well-formed XML documents for importation into DataCite from an Excel workbook.

The script first combines metadata in the Excel sheets into an easily-readable CSV using the Python pandas library and the xlrd package. The script will prompt you for the filename of the Excel document and what you'd like the CSV file to be named.

The script then creates one or many XML documents from the CSV based on the request number field, using the lxml package and CSV module. Each unique request number creates a corresponding XML document. The XML documents are formed to adhere to the DataCite Metadata Schema 4.2 and are named based on request number.

Documents needed:

Documents created:

  • One CSV document with all data from completed Excel workbook
  • One or many XML documents
  • Log file with terminal & error messages