aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2019-10-04 15:51:38 -0700
committerBryan Newbold <bnewbold@archive.org>2019-10-04 15:51:38 -0700
commit84a501f86dc9a6a2e25e58c7380575ed946c9357 (patch)
treee26ae69e413fa38d3f4dda198a0e0302cceb9873 /python
parent04c0882a3c216fd43cbb2643f2f8dbc257fd2338 (diff)
downloadsandcrawler-84a501f86dc9a6a2e25e58c7380575ed946c9357.tar.gz
sandcrawler-84a501f86dc9a6a2e25e58c7380575ed946c9357.zip
remove any trailing newline
Diffstat (limited to 'python')
-rwxr-xr-xpython/grobid2json.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/grobid2json.py b/python/grobid2json.py
index ae31486..df21883 100755
--- a/python/grobid2json.py
+++ b/python/grobid2json.py
@@ -125,8 +125,8 @@ def teixml2json(content, encumbered=True):
if header is None:
raise ValueError("XML does not look like TEI format")
application_tag = header.findall('.//{%s}appInfo/{%s}application' % (ns, ns))[0]
- info['grobid_version'] = application_tag.attrib['version']
- info['grobid_timestamp'] = application_tag.attrib['when']
+ info['grobid_version'] = application_tag.attrib['version'].strip()
+ info['grobid_timestamp'] = application_tag.attrib['when'].strip()
info['title'] = header.findtext('.//{%s}analytic/{%s}title' % (ns, ns))
info['authors'] = all_authors(header.find('.//{%s}sourceDesc/{%s}biblStruct' % (ns, ns)))
info['journal'] = journal_info(header)