Skip to content

Commit

Permalink
Add teaching resource item type
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorrell committed Sep 28, 2020
1 parent 4455b9c commit 5c00ac1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions caltech_authors_tech_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,21 @@ def epxml_to_datacite(eprint, customization=None):
metadata["publicationYear"] = eprint["date"].split("-")[0]
else:
metadata["publicationYear"] = eprint["date"]
metadata["types"] = {
"resourceTypeGeneral": "Text",
"resourceType": item_types[eprint["monograph_type"]],
}

if "monograph_type" in eprint:
metadata["types"] = {
"resourceTypeGeneral": "Text",
"resourceType": item_types[eprint["monograph_type"]],
}
elif eprint["type"] == "teaching_resource":
metadata["types"] = {
"resourceTypeGeneral": "Text",
"resourceType": "Teaching Resource",
}
else:
metadata["types"] = {
"resourceTypeGeneral": "Text",
"resourceType": "Text",
}
# Waterfall for determining series name and number
if "abstract" in eprint:
description = [
Expand Down

0 comments on commit 5c00ac1

Please sign in to comment.