aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/transform.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-16 16:21:21 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-16 16:21:21 -0800
commit703ce536e20c1c25f38cab575fe645b56fb692fa (patch)
treee2ea342226b09d6820af0a05a90768e08ffcd12f /fatcat_scholar/transform.py
parent1ec605455589fefc6f96d0bbad625afa20769eb2 (diff)
downloadfatcat-scholar-703ce536e20c1c25f38cab575fe645b56fb692fa.tar.gz
fatcat-scholar-703ce536e20c1c25f38cab575fe645b56fb692fa.zip
small corrections to schema/transform
Diffstat (limited to 'fatcat_scholar/transform.py')
-rw-r--r--fatcat_scholar/transform.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py
index b65197f..417fe38 100644
--- a/fatcat_scholar/transform.py
+++ b/fatcat_scholar/transform.py
@@ -277,7 +277,9 @@ def biblio_metadata_hacks(biblio: ScholarBiblio) -> ScholarBiblio: # noqa: C901
"""
# valid year
- if biblio.release_year and biblio.release_year > 2025:
+ if biblio.release_year and (
+ biblio.release_year > 2025 or biblio.release_year < 1500
+ ):
biblio.release_year = None
biblio.release_date = None
@@ -386,7 +388,7 @@ def generate_tags(
if container.extra.get("platform"):
# scielo, ojs, wordpress, etc
tags.append(container.extra["platform"].lower())
- if biblio.doi_prefix == "10.2307":
+ if biblio.doi_prefix == "10.2307" or biblio.jstor_id:
tags.append("jstor")
return list(set(tags))