aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/licenses.py
blob: cb137fa8d932147aa04d935c4cad9e705e06bfb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011 MediaGoblin contributors.  See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

SUPPORTED_LICENSES = {
    "": {
        "name": "No license specified",
        "abbreviation": "All rights reserved"
        },
    "http://creativecommons.org/licenses/by/3.0/": {
        "name": "Creative Commons Attribution Unported 3.0",
        "abbreviation": "CC BY 3.0"
        },
    "http://creativecommons.org/licenses/by-sa/3.0": {
        "name": "Creative Commons Attribution-ShareAlike Unported 3.0",
        "abbreviation": "CC BY-SA 3.0"
        },
    "http://creativecommons.org/licenses/by-nd/3.0": {
        "name": "Creative Commons Attribution-NoDerivs 3.0 Unported",
        "abbreviation": "CC BY-ND 3.0"
        },
    "http://creativecommons.org/licenses/by-nc/3.0": {
        "name": "Creative Commons Attribution-NonCommercial Unported 3.0",
        "abbreviation": "CC BY-NC 3.0"
        },
    "http://creativecommons.org/licenses/by-nc-sa/3.0": {
        "name": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported",
        "abbreviation": "CC BY-NC-SA 3.0"
        },
    "http://creativecommons.org/licenses/by-nc-nd/3.0": {
        "name": "Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported",
        "abbreviation": "CC BY-NC-ND 3.0"
        },
    "http://creativecommons.org/publicdomain/zero/1.0/": {
        "name": "Creative Commons CC0 1.0 Universal",
        "abbreviation": "CC0 1.0"
        },
    "http://creativecommons.org/publicdomain/mark/1.0/": {
        "name": "Public Domain",
        "abbreviation": "Public Domain"
        },
}

def licenses_as_choices():
    license_list = []

    for uri, data in SUPPORTED_LICENSES.items():
        license_list.append((uri, data["abbreviation"]))

    return license_list