aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/parse_arxivraw_xml.py2
-rw-r--r--python/parse_jalc_xml.py2
-rw-r--r--python/parse_jstor_xml.py3
3 files changed, 4 insertions, 3 deletions
diff --git a/python/parse_arxivraw_xml.py b/python/parse_arxivraw_xml.py
index 16def821..9b9f28c9 100644
--- a/python/parse_arxivraw_xml.py
+++ b/python/parse_arxivraw_xml.py
@@ -126,7 +126,7 @@ class ArxivRawXmlParser():
both = abst.split('-----')
abst = both[0].strip()
orig = both[1].strip()
- if '$' in abst or '{' in abstr:
+ if '$' in abst or '{' in abst:
mime = "application/x-latex"
abst_plain = latex2text.latex_to_text(abst)
abstracts.append(dict(content=abst_plain, mime="text/plain", lang="en"))
diff --git a/python/parse_jalc_xml.py b/python/parse_jalc_xml.py
index 7df79421..d7817df9 100644
--- a/python/parse_jalc_xml.py
+++ b/python/parse_jalc_xml.py
@@ -94,7 +94,7 @@ class JalcXmlParser():
if date:
date = date.string
if len(date) is 10:
- release_date = datetime.datetime.strptime(state['completed-date'], DATE_FMT).date()
+ release_date = datetime.datetime.strptime(date['completed-date'], DATE_FMT).date()
release_year = release_date.year
release_date = release_date.isoformat()
elif len(date) is 4:
diff --git a/python/parse_jstor_xml.py b/python/parse_jstor_xml.py
index dfb899fd..04f2b18e 100644
--- a/python/parse_jstor_xml.py
+++ b/python/parse_jstor_xml.py
@@ -114,7 +114,8 @@ class JstorXmlParser():
release_type = "letter"
elif "[Poem" in title or "[Photograph" in title:
release_type = None
- else if title.startswith("[") and title.endswith("]"):
+
+ if title.startswith("[") and title.endswith("]"):
# strip brackets if that is all that is there (eg, translation or non-english)
title = title[1:-1]