It's 2012 all up in here
[mediagoblin.git] / mediagoblin / tools / licenses.py
CommitLineData
0bfb4dc2 1# GNU MediaGoblin -- federated, autonomous media hosting
cf29e8a8 2# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
0bfb4dc2
AW
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU Affero General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU Affero General Public License for more details.
13#
14# You should have received a copy of the GNU Affero General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
5d775ebd
CAW
17SORTED_SUPPORTED_LICENSES = [
18 ("",
19 {"name": "No license specified",
20 "abbreviation": "All rights reserved"}),
21 ("http://creativecommons.org/licenses/by/3.0/",
22 {"name": "Creative Commons Attribution Unported 3.0",
23 "abbreviation": "CC BY 3.0"}),
ee4fb812 24 ("http://creativecommons.org/licenses/by-sa/3.0/",
5d775ebd
CAW
25 {"name": "Creative Commons Attribution-ShareAlike Unported 3.0",
26 "abbreviation": "CC BY-SA 3.0"}),
ee4fb812 27 ("http://creativecommons.org/licenses/by-nd/3.0/",
5d775ebd
CAW
28 {"name": "Creative Commons Attribution-NoDerivs 3.0 Unported",
29 "abbreviation": "CC BY-ND 3.0"}),
ee4fb812 30 ("http://creativecommons.org/licenses/by-nc/3.0/",
5d775ebd
CAW
31 {"name": "Creative Commons Attribution-NonCommercial Unported 3.0",
32 "abbreviation": "CC BY-NC 3.0"}),
ee4fb812 33 ("http://creativecommons.org/licenses/by-nc-sa/3.0/",
5d775ebd
CAW
34 {"name": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported",
35 "abbreviation": "CC BY-NC-SA 3.0"}),
ee4fb812 36 ("http://creativecommons.org/licenses/by-nc-nd/3.0/",
5d775ebd
CAW
37 {"name": "Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported",
38 "abbreviation": "CC BY-NC-ND 3.0"}),
39 ("http://creativecommons.org/publicdomain/zero/1.0/",
40 {"name": "Creative Commons CC0 1.0 Universal",
41 "abbreviation": "CC0 1.0"}),
42 ("http://creativecommons.org/publicdomain/mark/1.0/",
43 {"name": "Public Domain",
44 "abbreviation": "Public Domain"})]
45
46SUPPORTED_LICENSES = dict(SORTED_SUPPORTED_LICENSES)
47
0bfb4dc2
AW
48
49def licenses_as_choices():
50 license_list = []
51
2c1f1fd0 52 for uri, data in SORTED_SUPPORTED_LICENSES:
0bfb4dc2
AW
53 license_list.append((uri, data["abbreviation"]))
54
55 return license_list