From bc179396a6c60fd1ba107b8fe388697ac0377fc9 Mon Sep 17 00:00:00 2001 From: Dpg Date: Thu, 24 May 2018 00:59:38 +1000 Subject: [PATCH] Add Creative Commons 4.0 licenses [#955] Add CC version 4.0 licenses to SORTED_LICENSES. --- mediagoblin/tools/licenses.py | 37 +++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/mediagoblin/tools/licenses.py b/mediagoblin/tools/licenses.py index a964980e..2aff7f20 100644 --- a/mediagoblin/tools/licenses.py +++ b/mediagoblin/tools/licenses.py @@ -20,28 +20,45 @@ License = namedtuple("License", ["abbreviation", "name", "uri"]) SORTED_LICENSES = [ License("All rights reserved", "No license specified", ""), + License("CC BY 4.0", "Creative Commons Attribution 4.0 International", + "https://creativecommons.org/licenses/by/4.0/"), + License("CC BY-SA 4.0", + "Creative Commons Attribution-ShareAlike 4.0 International", + "https://creativecommons.org/licenses/by-sa/4.0/"), + License("CC BY-ND 4.0", + "Creative Commons Attribution-NoDerivs 4.0 International", + "https://creativecommons.org/licenses/by-nd/4.0/"), + License("CC BY-NC 4.0", + "Creative Commons Attribution-NonCommercial 4.0 International", + "https://creativecommons.org/licenses/by-nc/4.0/"), + License("CC BY-NC-SA 4.0", + "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", + "https://creativecommons.org/licenses/by-nc-sa/4.0/"), + License("CC BY-NC-ND 4.0", + "Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International", + "https://creativecommons.org/licenses/by-nc-nd/4.0/"), License("CC BY 3.0", "Creative Commons Attribution Unported 3.0", - "http://creativecommons.org/licenses/by/3.0/"), + "https://creativecommons.org/licenses/by/3.0/"), License("CC BY-SA 3.0", - "Creative Commons Attribution-ShareAlike Unported 3.0", - "http://creativecommons.org/licenses/by-sa/3.0/"), + "Creative Commons Attribution-ShareAlike 3.0 Unported", + "https://creativecommons.org/licenses/by-sa/3.0/"), License("CC BY-ND 3.0", "Creative Commons Attribution-NoDerivs 3.0 Unported", - "http://creativecommons.org/licenses/by-nd/3.0/"), + "https://creativecommons.org/licenses/by-nd/3.0/"), License("CC BY-NC 3.0", - "Creative Commons Attribution-NonCommercial Unported 3.0", - "http://creativecommons.org/licenses/by-nc/3.0/"), + "Creative Commons Attribution-NonCommercial 3.0 Unported", + "https://creativecommons.org/licenses/by-nc/3.0/"), License("CC BY-NC-SA 3.0", "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported", - "http://creativecommons.org/licenses/by-nc-sa/3.0/"), + "https://creativecommons.org/licenses/by-nc-sa/3.0/"), License("CC BY-NC-ND 3.0", "Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported", - "http://creativecommons.org/licenses/by-nc-nd/3.0/"), + "https://creativecommons.org/licenses/by-nc-nd/3.0/"), License("CC0 1.0", "Creative Commons CC0 1.0 Universal", - "http://creativecommons.org/publicdomain/zero/1.0/"), + "https://creativecommons.org/publicdomain/zero/1.0/"), License("Public Domain","Public Domain", - "http://creativecommons.org/publicdomain/mark/1.0/"), + "https://creativecommons.org/publicdomain/mark/1.0/"), ] # dict {uri: License,...} to enable fast license lookup by uri. Ideally, -- 2.25.1