From 0e914e4a65237b97fcf29d6040b1cfb45d5b0746 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 19 Mar 2019 23:06:28 -0700 Subject: fix cdl_dash_dat license_slug --- python/fatcat_tools/importers/cdl_dash_dat.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'python/fatcat_tools') 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, -- cgit v1.2.3