Skip to content

Commit c5dfa98

Browse files
committed
Fix series information and timestamp bugs
1 parent 757a9a7 commit c5dfa98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

caltech_authors_tech_report.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def epxml_to_datacite(eprint, customization=None):
131131
eprint["other_numbering_system"]["item"]
132132
]
133133

134-
if "series_name" in eprint and "number" in eprint:
135-
name_and_series = [eprint["series_name"], eprint["number"]]
134+
if "series" in eprint and "number" in eprint:
135+
name_and_series = [eprint["series"], eprint["number"]]
136136
elif "other_numbering_system" in eprint:
137137
# Assume first is correct
138138
item = eprint["other_numbering_system"]["item"][0]
@@ -245,7 +245,7 @@ def epxml_to_datacite(eprint, customization=None):
245245
# Dates - only if record release date present
246246
if "datestamp" in eprint:
247247
dates = []
248-
dates.append({"date": eprint["datestamp"], "dateType": "Available"})
248+
dates.append({"date": eprint["datestamp"].split(' ')[0], "dateType": "Available"})
249249
metadata["dates"] = dates
250250

251251
metadata["schemaVersion"] = "http://datacite.org/schema/kernel-4"

caltech_thesis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def epxml_to_datacite(eprint):
192192
dates.append({"date": eprint["gradofc_approval_date"], "dateType": "Accepted"})
193193
# These are scanned records, we just list when they were made available
194194
else:
195-
dates.append({"date": eprint["datestamp"], "dateType": "Available"})
195+
dates.append({"date": eprint["datestamp"].split(' ')[0], "dateType": "Available"})
196196
metadata["dates"] = dates
197197

198198
# Identifiers

0 commit comments

Comments
 (0)