JQuery plugin for easy selection of public licenses.
Read our paper for more details.
Use the selector directly on Github. You can link to this to always use our latest version.
- CLARIN DSpace Repositories: deployments in Czechia, Italy, Lithuania, Norway, Poland, Slovenia, Spain, Sweden, Brazil.
- EUDAT B2SHARE Repository
In case you use Public License Selector, please let us know. We would love to add your site to this list.
The plugin contains common set of so called public licenses which will make your work publicly available.
bower install public-license-selector --save
The latest version is in the releases branch.
The plugin requires Lo-Dash or Underscore utility library.
<link rel="stylesheet" href="license-selector.css">
<script type="text/javascript" src="license-selector.js"></script>
<script type="text/javascript">
$(function() {
'use strict';
$('selector').licenseSelector({ ...options... });
});
</script>Callback to action that should happen after the license is selected. Receives selected license as a first argument.
onLicenseSelected : function (license) {
$('body').append($('<pre></pre>').text(JSON.stringify(license, null, 4)))
console.log(license)
}A template function to customize license display in the license list. See the example below. The function takes three arguments:
- jQuery object of an
<li>element licenseobject with attributes defined bellow- select function - the function that actually does the license selection. Can be used as
onClickhandler
JQuery selector specifying a html element where license selector should be attached. Default is 'body'.
Name of the starting question. See to sources for the full list of names. Here are the most useful:
- 'KindOfContent' (default) is asking about the kind of content (Software or Data)
- 'DataCopyrightable' jumps straight to data licensing. Use this as a
startif you want to choose only licenses for data. - 'YourSoftware' jumps to software licensing. The same as above but for software.
Whether or not to show labels for each license.
A list of licenses that will get merged to the predefined license. The merge is done by _.merge so you can use it to add new licenses or to change configuration of the predefined licenses.
.licenseSelector({
licenses: {
'abc-license': {
name: 'NEW license',
priority: 1,
available: true,
url: 'http://www.example.com/new-license',
description: 'This is new license inserted as a test',
categories: ['data', 'new'],
template: function($el, license, selectFunction) {
var h = $('<h4 />').text(license.name);
h.append($('<a/>').attr({
href: license.url,
target: '_blank'
}));
$el.append(h);
$el.append('<p>Custom template function</p>');
$el.append(
$('<button/>')
.append('<span>Click here to select license</span>')
.click(selectFunction)
);
}
},
'cc-by': {
description: 'Modified description ...',
cssClass: 'featured-license'
},
'lgpl-3': {
available: false // hide the LGPL 3 license
}
}
);stringkey - The hash key (will be automatically added)stringname - Full name of the licenseboolavailable - Flag whether the license is visible in the license listunsigned intpriority - Sort priority (lower means higher in the license list)stringurl - Url pointing to the license full textstringdescription - A short description of the licensestringcssClass - Custom CSS class set on<li>elementfunction|jQuerytemplate - Template used for custom formatarray[string]categories - A list of arbitrary category names used for filtering in the questionsarray[string]labels - A list of labels that will be shown for the license. Each labels has a picture or special css style connected so this is not completely arbitrary.
List of licenses that can be chosen in with default settings.
| License name | URL |
|---|---|
| Affero General Public License 3 (AGPL-3.0) | http://opensource.org/licenses/AGPL-3.0 |
| Apache License 2 | http://www.apache.org/licenses/LICENSE-2.0 |
| Artistic License 1.0 | http://opensource.org/licenses/Artistic-Perl-1.0 |
| Artistic License 2.0 | http://opensource.org/licenses/Artistic-2.0 |
| Common Development and Distribution License (CDDL-1.0) | http://opensource.org/licenses/CDDL-1.0 |
| Creative Commons Attribution (CC-BY) | http://creativecommons.org/licenses/by/4.0/ |
| Creative Commons Attribution-NoDerivs (CC-BY-ND) | http://creativecommons.org/licenses/by-nd/4.0/ |
| Creative Commons Attribution-NonCommercial (CC-BY-NC) | http://creativecommons.org/licenses/by-nc/4.0/ |
| Creative Commons Attribution-NonCommercial-NoDerivs (CC-BY-NC-ND) | http://creativecommons.org/licenses/by-nc-nd/4.0/ |
| Creative Commons Attribution-NonCommercial-ShareAlike (CC-BY-NC-SA) | http://creativecommons.org/licenses/by-nc-sa/4.0/ |
| Creative Commons Attribution-ShareAlike (CC-BY-SA) | http://creativecommons.org/licenses/by-sa/4.0/ |
| Eclipse Public License 1.0 (EPL-1.0) | http://opensource.org/licenses/EPL-1.0 |
| GNU General Public License 2 or later (GPL-2.0) | http://opensource.org/licenses/GPL-2.0 |
| GNU General Public License 3 (GPL-3.0) | http://opensource.org/licenses/GPL-3.0 |
| GNU Library or "Lesser" General Public License 2.1 or later (LGPL-2.1) | http://opensource.org/licenses/LGPL-2.1 |
| GNU Library or "Lesser" General Public License 3.0 (LGPL-3.0) | http://opensource.org/licenses/LGPL-3.0 |
| Mozilla Public License 2.0 | http://opensource.org/licenses/MPL-2.0 |
| Public Domain Dedication (CC Zero) | http://creativecommons.org/publicdomain/zero/1.0/ |
| Public Domain Mark (PD) | http://creativecommons.org/publicdomain/mark/1.0/ |
| The BSD 2-Clause "Simplified" or "FreeBSD" License | http://opensource.org/licenses/BSD-2-Clause |
| The BSD 3-Clause "New" or "Revised" License (BSD) | http://opensource.org/licenses/BSD-3-Clause |
| The MIT License (MIT) | http://opensource.org/licenses/mit-license.php |
Node environment is not required but strongly recommended for the development
-
Install Node
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash nvm install stable nvm use stable -
Clone repository
git clone https://github.com/ufal/public-license-selector.git cd public-license-selector make install -
Start development server
make run
| Task | Version |
|---|---|
| make release | v0.0.1 -> v0.0.2 + commit + tag + push |
| make release-minor | v0.0.1 -> v0.1.0 + commit + tag + push |
| make release-major | v0.0.1 -> v1.0.1 + commit + tag + push |
- Pawel Kamocki [email protected]
- Pavel Straňák [email protected]
- Michal Sedlák [email protected]
Descriptions for some licenses taken from (or inspired by) descriptions at tldrLegal.
You must not rely on the information from License Selector as an alternative to legal advice from your attorney or other professional legal services provider.
Licensed under the incredibly permissive MIT license
Copyright © 2015 Institute of Formal and Applied Linguistics (http://ufal.mff.cuni.cz)