From f32c435c207f439abb66de5dbb6a1b67a75d0405 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 3 Dec 2020 21:58:11 +0100 Subject: add case --- fuzzycat/verify.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fuzzycat/verify.py') diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py index 993b7c9..6d824d4 100644 --- a/fuzzycat/verify.py +++ b/fuzzycat/verify.py @@ -212,6 +212,7 @@ def compare(a, b): if re.match(r"appendix ?[^ ]*$", a_title_lower): return (Status.AMBIGUOUS, Miss.APPENDIX) + try: # TODO: figshare versions, "xxx.v1" FIGSHARE_PREFIX = "10.6084/" @@ -330,6 +331,17 @@ def compare(a, b): if result: return result + if a_slug_title == b_slug_title: + try: + # https://dlc.library.columbia.edu/lcaaj/cul:p5hqbzkhxb, + # https://dlc.library.columbia.edu/lcaaj/cul:5tb2rbp0nj + a_doi = glom(a, "ext_ids.doi") + b_doi = glom(b, "ext_ids.doi") + if has_doi_prefix(a_doi, "10.7916") and has_doi_prefix(b_doi, "10.7916"): + return (Status.AMBIGUOUS, Miss.CUSTOM_PREFIX_10_7916) + except PathAccessError: + pass + if a_slug_title == b_slug_title: try: a_subtitles = glom(a, "extra.subtitle") or [] -- cgit v1.2.3