summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-03-19 23:06:28 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-03-19 23:06:28 -0700
commit0e914e4a65237b97fcf29d6040b1cfb45d5b0746 (patch)
tree91238e31728a576e2ca204c09673cffa58d09232 /python
parent791c4fba327eadcd676b53769d84db1026661ddf (diff)
downloadfatcat-0e914e4a65237b97fcf29d6040b1cfb45d5b0746.tar.gz
fatcat-0e914e4a65237b97fcf29d6040b1cfb45d5b0746.zip
fix cdl_dash_dat license_slug
Diffstat (limited to 'python')
-rwxr-xr-xpython/fatcat_tools/importers/cdl_dash_dat.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/python/fatcat_tools/importers/cdl_dash_dat.py b/python/fatcat_tools/importers/cdl_dash_dat.py
index 3da51cce..1a21194d 100755
--- a/python/fatcat_tools/importers/cdl_dash_dat.py
+++ b/python/fatcat_tools/importers/cdl_dash_dat.py
@@ -12,11 +12,8 @@ import subprocess
import fatcat_client
from fatcat_client import *
from .common import clean
+from .crossref import lookup_license_slug
-# TODO:
-LICENSE_MAP = {
- "https://creativecommons.org/licenses/by/4.0/": "CC-BY",
-}
def single_file(prefix, path):
@@ -75,9 +72,7 @@ def cdl_dash_release(meta, extra=None):
assert ark_id
extra['ark_id'] = ark_id
- license_slug = LICENSE_MAP.get(meta['rights']['uri'])
- if meta['rights']['uri'] == 'https://creativecommons.org/licenses/by/4.0/':
- license_slug = 'CC-BY'
+ license_slug = lookup_license_slug(meta['rights']['uri'])
abstracts = []
for desc in meta['descriptions']:
@@ -106,6 +101,7 @@ def cdl_dash_release(meta, extra=None):
publisher=clean(meta['publisher']),
release_year=int(meta['publicationYear']),
release_type="dataset",
+ license_slug=license_slug,
contribs=contribs,
abstracts=abstracts,
extra=extra,