1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

getting unlicense text into CC0 file for merge

This commit is contained in:
CamilleM 2013-07-23 13:37:38 +02:00
commit 0161a3d75d
19 changed files with 166 additions and 51 deletions

View File

@ -41,6 +41,16 @@ Licenses sit in the `/licenses` folder as markdown (`.md`) files. Each license h
* `note` - The note field in the sidebar (optional)
* `how` - How to use the license, also in the sidebar
* `required`, `permitted`, `forbidden` - bulleted list of rules applicable to the license (see below)
* `filename` - The filename to be created on GitHub.com when a repository is initialized with this license.
The licenses on choosealicense.com are regularly imported to GitHub.com to be used as the list of licenses available when creating a repository. When we create a repository, we will replace certain strings in the license with variables from the repository. These can be used to create accurate copyright notices. The available variables are:
* `[fullname]` - The full name or username of the repository owner
* `[login]` - The repository owner's username
* `[email]` - The repository owner's primary email address
* `[project]` - The repository name
* `[description]` - The description of the repository
* `[year]` - The current year
# Rules

View File

@ -61,3 +61,7 @@ rules:
description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
exclude:
- CNAME
- Gemfile*
- script

View File

@ -4,7 +4,7 @@
<div class='how-to-apply callout'>
<h5>How to apply this license</h5>
<p>
{{ page.how | replace:"<<","[" | replace:">>","]" }}
{{ page.how }}
</p>
{% if page.note %}
<p class="note">
@ -43,4 +43,4 @@
</div>
{% endif %}
</div><!-- /sidebar -->
</div><!-- /sidebar -->

View File

@ -4,7 +4,7 @@
<div class='license-body'>
<pre id="license-text">
{{ content | replace:"<<","[" | replace:">>","]" }}
{{ content | replace:"<","[" | replace:">","]" }}
</pre><!-- /license-text -->
</div><!-- /license-body -->
@ -13,4 +13,4 @@
</div><!-- /cf -->
{% include footer.html %}
{% include footer.html %}

View File

@ -56,7 +56,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
body {
background: #f5f1ec url(../images/bg.jpg);
color: #7e7974;
color: #5c5855;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.4;
@ -233,7 +233,7 @@ strong {
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
color: #7e7974;
color: #5c5855;
padding: 16px;
}
.see-more {
@ -276,7 +276,7 @@ strong {
font-size: 16px;
}
.license-rules .summary {
color: #7e7974;
color: #5c5855;
}
.license-rules td {
border-bottom: solid 1px #e9e6e2;
@ -379,7 +379,7 @@ strong {
border-top: 1px solid #e9e6e1;
margin-top: 30px;
padding-top: 20px;
color: #7e7974;
color: #5c5855;
font-size: 12px;
text-align: left;
line-height: 1.5;

View File

@ -39,7 +39,7 @@ description: A site to provide non-judgmental guidance on choosing a license for
The GPL (<a href="licenses/gpl-v2">V2</a> or <a href="licenses/gpl-v3">V3</a>) is a copyleft license that requires others who modify your code to disclose their changes if they redistribute it in source or binary form. V3 is similar to V2, but further restricts use in hardware that forbids software alterations.
</p>
<p>
<strong>Linux</strong>, <strong>Git</strong> and <strong>WordPress</strong> use the GPL.
<strong>Linux</strong>, <strong>Git</strong>, and <strong>WordPress</strong> use the GPL.
</p>
</li>
</ul>

View File

@ -1,5 +1,26 @@
class Choosealicense
# Checks if Flash is available in the client.
flashAvailable: ->
if ActiveXObject?
!!(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'))
else
!!navigator.mimeTypes["application/x-shockwave-flash"]
# Selects the content of a given element
selectText: (element) ->
if document.body.createTextRange
range = document.body.createTextRange();
range.moveToElementText(element);
range.select();
else if window.getSelection
selection = window.getSelection()
range = document.createRange()
range.selectNodeContents(element)
selection.removeAllRanges();
selection.addRange(range);
# Qtip position attributes for tooltips
qtip_position:
my: "top center"
@ -14,7 +35,7 @@ class Choosealicense
# fire on document.ready
constructor: ->
@initTooltips()
@initClipboard() if ZeroClipboard?
@initClipboard()
# Init tooltip action
initTooltips: ->
@ -37,19 +58,32 @@ class Choosealicense
false
# Initializes ZeroClipboard
initZeroClipboard: ->
# Backup the clipboard button's original text.
$(".js-clipboard-button").data "clipboard-prompt", $(".js-clipboard-button").text()
# Hook up copy to clipboard buttons
clip = new ZeroClipboard $(".js-clipboard-button"),
moviePath: "/javascripts/ZeroClipboard.swf"
clip.on "mouseout", @clipboardMouseout
clip.on "complete", @clipboardComplete
clip
# Initializes an alternative way to copy the license for non-flash compatible
# browsers
initAlternativeClipboard: ->
$(".js-clipboard-button").click (e) =>
target = "#" + $(e.target).data("clipboard-target")
@selectText $(target)[0]
# if Zero Clipboard is present, bind to button and init
initClipboard: ->
if ZeroClipboard? && @flashAvailable()
@initZeroClipboard()
else
@initAlternativeClipboard()
# Backup the clipboard button's original text.
$(".js-clipboard-button").data "clipboard-prompt", $(".js-clipboard-button").text()
# Hook up copy to clipboard buttons
clip = new ZeroClipboard $(".js-clipboard-button"),
moviePath: "/javascripts/ZeroClipboard.swf"
clip.on "mouseout", @clipboardMouseout
clip.on "complete", @clipboardComplete
clip
# Callback to restore the clipboard button's original text
clipboardMouseout: (client, args) ->
@innerText = $(this).data("clipboard-prompt")
@ -59,4 +93,4 @@ class Choosealicense
@innerText = "Copied!"
$ ->
new Choosealicense()
new Choosealicense()

View File

@ -1,8 +1,32 @@
// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.4.0
(function() {
var Choosealicense;
Choosealicense = (function() {
Choosealicense.prototype.flashAvailable = function() {
if (typeof ActiveXObject !== "undefined" && ActiveXObject !== null) {
return !!(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));
} else {
return !!navigator.mimeTypes["application/x-shockwave-flash"];
}
};
Choosealicense.prototype.selectText = function(element) {
var range, selection;
if (document.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(element);
return range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
return selection.addRange(range);
}
};
Choosealicense.prototype.qtip_position = {
my: "top center",
at: "bottom center"
@ -16,9 +40,7 @@
function Choosealicense() {
this.initTooltips();
if (typeof ZeroClipboard !== "undefined" && ZeroClipboard !== null) {
this.initClipboard();
}
this.initClipboard();
}
Choosealicense.prototype.initTooltips = function() {
@ -49,7 +71,7 @@
return false;
};
Choosealicense.prototype.initClipboard = function() {
Choosealicense.prototype.initZeroClipboard = function() {
var clip;
$(".js-clipboard-button").data("clipboard-prompt", $(".js-clipboard-button").text());
clip = new ZeroClipboard($(".js-clipboard-button"), {
@ -60,6 +82,23 @@
return clip;
};
Choosealicense.prototype.initAlternativeClipboard = function() {
var _this = this;
return $(".js-clipboard-button").click(function(e) {
var target;
target = "#" + $(e.target).data("clipboard-target");
return _this.selectText($(target)[0]);
});
};
Choosealicense.prototype.initClipboard = function() {
if ((typeof ZeroClipboard !== "undefined" && ZeroClipboard !== null) && this.flashAvailable()) {
return this.initZeroClipboard();
} else {
return this.initAlternativeClipboard();
}
};
Choosealicense.prototype.clipboardMouseout = function(client, args) {
return this.innerText = $(this).data("clipboard-prompt");
};

28
licenses.json Normal file
View File

@ -0,0 +1,28 @@
---
comment: \
because the for loop is being filtered by layout, the normal rindex0 check
for the trailing comma doesn't work. Count the number of licenses and manually
increment an index to see if we're on the true last iteration.
---
{% assign count = 0 %}{% for page in site.pages %}{% if page.layout == "license" %}{% assign count = count | plus: 1 %}{% endif %}{% endfor %}{% assign i = 0 %}
[
{% for page in site.pages %}{% if page.layout == "license" %}
{
"title": "{{ page.title }}",
"permalink": "{{ page.permalink }}",
"featured": {% if page.featured %}true{% else %}false{% endif %},
"description": "{{ page.description | replace: '"', '\"' }}",
"how": "{{ page.how | replace: '"', '\"' }}",
"rules": {
{% for category in site.rules %}
{% assign cat = category[0] %}
"{{ cat }}": [
{% for rule in page[cat] %}
"{{ rule }}"{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
]{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
}{% assign i = i | plus: 1 %}
}{% if i < count %},{% endif %}
{% endif %}{% endfor %}
]

View File

@ -201,14 +201,14 @@ END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -7,7 +7,7 @@ source: http://opensource.org/licenses/Artistic-2.0
description: A license that&#8217;s heavily favored by the Perl community.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace <<year>> with the current year and <<copyright holders>> with the name (or names) of the copyright holders.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
required:
- include-copyright
@ -25,7 +25,7 @@ forbidden:
---
Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
Copyright (c) [year] [fullname]
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.

View File

@ -5,7 +5,7 @@ permalink: /licenses/BSD-2-Clause/
description: A permissive license that comes in two variants, the <a href="/licenses/bsd">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause">BSD 3-Clause</a>. Both have very minute differences to the MIT license.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace <<year>> with the current year and <<fullname>> with the name (or names) of the copyright holders.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
source: http://opensource.org/licenses/BSD-2-Clause
@ -23,7 +23,7 @@ forbidden:
---
Copyright (c) <<year>>, <<fullname>>
Copyright (c) [year], [fullname]
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

View File

@ -3,7 +3,7 @@ layout: license
title: BSD 3-clause "New" or "Revised" License
permalink: /licenses/BSD-3-Clause/
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace <<year>> with the current year and <<fullname>> with the name (or names) of the copyright holders. Replace {organization} with the organization, if any, that sponsors this work.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. Replace {organization} with the organization, if any, that sponsors this work.
source: http://opensource.org/licenses/BSD-3-Clause
@ -22,7 +22,7 @@ forbidden:
---
Copyright (c) <<year>>, <<fullname>>
Copyright (c) [year], [fullname]
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

View File

@ -1,8 +1,8 @@
---
layout: license
permalink: /licenses/CC0-1.0/
permalink: /licenses/public-domain/
class: license-types
title: Creative Commons Zero v1.0 Universal
title: Public Domain (CC0)
description: Because copyright attaches automatically in many countries, the Creative Commons CC0 License is recommended to ensure that your work is available everywhere under terms that most closely follow the spirit of a public domain work.

View File

@ -29,7 +29,7 @@ forbidden:
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -318,8 +318,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<<description>>
Copyright (C) <<year>> <<fullname>>
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -28,7 +28,7 @@ forbidden:
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. {http://fsf.org/}
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -672,14 +672,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see {http://www.gnu.org/licenses/}.
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<<project>> Copyright (C) <<year>> <<fullname>>
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@ -691,11 +691,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
{http://www.gnu.org/licenses/}.
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
{http://www.gnu.org/philosophy/why-not-lgpl.html}.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -34,9 +34,9 @@ forbidden:
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
(This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
the version number 2.1.)
Preamble
@ -498,8 +498,8 @@ safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<<description>>
Copyright (C) <<year>> <<fullname>>
{description}
Copyright (C) {year} {fullname}
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -7,7 +7,7 @@ featured: true
description: A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace <<year>> with the current year and <<fullname>> with the name (or names) of the copyright holders.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
required:
- include-copyright
@ -25,7 +25,7 @@ forbidden:
The MIT License (MIT)
Copyright (c) <<year>> <<fullname>>
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View File

@ -24,4 +24,4 @@ forbidden:
---
Copyright <<year>> <<fullname>>
Copyright [year] [fullname]