diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-08-10 17:35:16 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-08-11 15:32:28 -0700 |
commit | ff05a03a3874e17557174d3534a1c2d11e01c4a6 (patch) | |
tree | 0f06f2b6bd1d58140422dd1be8b6d614290007ea /python/fatcat_tools | |
parent | 211ef075f5ac2960fa09134043a8246270d99baf (diff) | |
download | fatcat-ff05a03a3874e17557174d3534a1c2d11e01c4a6.tar.gz fatcat-ff05a03a3874e17557174d3534a1c2d11e01c4a6.zip |
datacite import: figshare-specific hacks
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/importers/datacite.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index 0481337a..6c050565 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -729,7 +729,7 @@ class DataciteImporter(EntityImporter): # figshare if re.ext_ids.doi.startswith('10.6084/') or re.ext_ids.doi.startswith('10.25384'): # set version if DOI ends with versioned suffix - doi_suffix = re.ext_ids.doi.split('.') + doi_suffix = re.ext_ids.doi.split('.')[-1] if doi_suffix and doi_suffix.startswith('v') and doi_suffix[1:].isdigit(): re.version = doi_suffix # "Figure 123 from " -> component @@ -741,8 +741,8 @@ class DataciteImporter(EntityImporter): re.release_type = "component" # figshare.com - if re.ext_ids.doi.startswith('10.6084/m9.figshare.') and re.container_name is None: - re.container_name = "figshare.com" + if re.ext_ids.doi.startswith('10.6084/m9.figshare.') and re.extra.get('container_name') is None: + re.extra['container_name'] = "figshare.com" return re |