Skip to content

Commit 5ad61a9

Browse files
authored
Merge pull request #56 from rettinghaus/master
update deprecated function
2 parents 7aa3e2f + 96d56fa commit 5ad61a9

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "CSV2CMI",
33
"description": "converts a table of letters into CMI format",
4-
"publication_date": "2019-03-29",
4+
"publication_date": "2019-09-22",
55
"creators": [{
66
"name": "Rettinghaus, Klaus",
77
"orcid": "0000-0003-1898-2543"

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2015-2018 by Klaus Rettinghaus
3+
Copyright (c) 2015-2019 by Klaus Rettinghaus
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"identifier": "CSV2CMI",
55
"name": "CSV2CMI",
66
"description": "converts a table of letters into CMI format",
7-
"softwareVersion": "2.0.1",
7+
"softwareVersion": "2.0.2",
88
"license": "OSI Approved :: MIT License",
99
"programmingLanguage": "Python :: 3",
1010
"maintainer": "https://orcid.org/0000-0003-1898-2543",
11-
"datePublished": "2019-03-29",
11+
"datePublished": "2019-09-22",
1212
"codeRepository": "https://github.com/saw-leipzig/csv2cmi",
1313
"author": [{
1414
"@id": "https://orcid.org/0000-0003-1898-2543",

csv2cmi.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from xml.etree.ElementTree import Element, SubElement, Comment, ElementTree
1919

2020
__license__ = "MIT"
21-
__version__ = '2.0.1'
21+
__version__ = '2.0.2'
2222

2323
# define log output
2424
logging.basicConfig(format='%(levelname)s: %(message)s')
@@ -134,15 +134,15 @@ def createFileDesc(config):
134134
editors = config.get('Project', 'editor').splitlines()
135135
for entity in editors:
136136
SubElement(titleStmt, 'editor').text = entity
137-
if len(titleStmt.getchildren()) == 1:
137+
if len(list(titleStmt)) == 1:
138138
logging.warning('Editor missing')
139139
SubElement(titleStmt, 'editor')
140140
# publication statement
141141
publicationStmt = SubElement(fileDesc, 'publicationStmt')
142142
publishers = config.get('Project', 'publisher').splitlines()
143143
for entity in publishers:
144144
SubElement(publicationStmt, 'publisher').text = entity
145-
if not(publicationStmt.getchildren()):
145+
if not(list(publicationStmt)):
146146
for editor in titleStmt.findall('editor'):
147147
SubElement(publicationStmt, 'publisher').text = editor.text
148148
idno = SubElement(publicationStmt, 'idno')
@@ -591,5 +591,6 @@ def processPlace(letter, correspondent):
591591

592592
try:
593593
tree.write(outFile, encoding="utf-8", xml_declaration=True, method="xml")
594+
print('CMI file written to', outFile)
594595
except PermissionError:
595596
logging.error('Could not save the file due to insufficient permission')

0 commit comments

Comments
 (0)