diff --git a/.zenodo.json b/.zenodo.json index c662569..9c139a0 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,7 +1,7 @@ { "title": "CSV2CMI", "description": "converts a table of letters into CMI format", - "publication_date": "2019-03-29", + "publication_date": "2019-09-22", "creators": [{ "name": "Rettinghaus, Klaus", "orcid": "0000-0003-1898-2543" diff --git a/LICENSE.txt b/LICENSE.txt index 3fd2d8b..2900238 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2015-2018 by Klaus Rettinghaus +Copyright (c) 2015-2019 by Klaus Rettinghaus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/codemeta.json b/codemeta.json index ba36f7c..b43ab86 100644 --- a/codemeta.json +++ b/codemeta.json @@ -4,11 +4,11 @@ "identifier": "CSV2CMI", "name": "CSV2CMI", "description": "converts a table of letters into CMI format", - "softwareVersion": "2.0.1", + "softwareVersion": "2.0.2", "license": "OSI Approved :: MIT License", "programmingLanguage": "Python :: 3", "maintainer": "https://orcid.org/0000-0003-1898-2543", - "datePublished": "2019-03-29", + "datePublished": "2019-09-22", "codeRepository": "https://github.com/saw-leipzig/csv2cmi", "author": [{ "@id": "https://orcid.org/0000-0003-1898-2543", diff --git a/csv2cmi.py b/csv2cmi.py index 5c7d6d9..383de67 100755 --- a/csv2cmi.py +++ b/csv2cmi.py @@ -18,7 +18,7 @@ from xml.etree.ElementTree import Element, SubElement, Comment, ElementTree __license__ = "MIT" -__version__ = '2.0.1' +__version__ = '2.0.2' # define log output logging.basicConfig(format='%(levelname)s: %(message)s') @@ -134,7 +134,7 @@ def createFileDesc(config): editors = config.get('Project', 'editor').splitlines() for entity in editors: SubElement(titleStmt, 'editor').text = entity - if len(titleStmt.getchildren()) == 1: + if len(list(titleStmt)) == 1: logging.warning('Editor missing') SubElement(titleStmt, 'editor') # publication statement @@ -142,7 +142,7 @@ def createFileDesc(config): publishers = config.get('Project', 'publisher').splitlines() for entity in publishers: SubElement(publicationStmt, 'publisher').text = entity - if not(publicationStmt.getchildren()): + if not(list(publicationStmt)): for editor in titleStmt.findall('editor'): SubElement(publicationStmt, 'publisher').text = editor.text idno = SubElement(publicationStmt, 'idno') @@ -591,5 +591,6 @@ def processPlace(letter, correspondent): try: tree.write(outFile, encoding="utf-8", xml_declaration=True, method="xml") + print('CMI file written to', outFile) except PermissionError: logging.error('Could not save the file due to insufficient permission')