diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-01-04 23:38:24 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-01-04 23:38:24 +0100 |
commit | ef10ddaf597bc122da530b5e66a5cca9b7363346 (patch) | |
tree | ce80bd76e4840683c9693e9f6cad5b4059a60202 /fuzzycat/utils.py | |
parent | 6287b9db107d3401f9b905fdd025898891f13cab (diff) | |
download | fuzzycat-ef10ddaf597bc122da530b5e66a5cca9b7363346.tar.gz fuzzycat-ef10ddaf597bc122da530b5e66a5cca9b7363346.zip |
add cases
Diffstat (limited to 'fuzzycat/utils.py')
-rw-r--r-- | fuzzycat/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fuzzycat/utils.py b/fuzzycat/utils.py index 1cdac47..84db5ec 100644 --- a/fuzzycat/utils.py +++ b/fuzzycat/utils.py @@ -53,6 +53,13 @@ def dict_key_exists(doc, path): return True +def doi_prefix(v): + """ + Return the prefix of a DOI. + """ + return v.split("/")[0] + + def has_doi_prefix(v, prefix="10.1234"): """ Returns False, if we cannot parse v or prefix does not match. |