许可证,简化。
policense的Python项目详细描述
授权,简化。
安装
$ pip3 install --user policense
生成许可文本(-l, --license
)
许可证是根据SPDX identifiers命名的。 有一些符号链接,所以您不必100%正确地记住(2bsd,bsd2->;bsd-2-clause) 如果有多个版本的许可证,当您在没有版本的情况下键入时,它将链接到最新版本(GPL->;GPL-3.0)。 许可证名称的字母大小写无关紧要,为什么呢?
$ policense -l BSD-2-Clause $ policense -l 2BSD $ policense -l BSD2 $ policense -l bSd-2-cLaUsE
输出
即使我们没有传递我们的名字,policense还是从git配置中获得了它。
BSD 2-Clause License
Copyright (c) 2019, Dawid Potocki
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
添加电子邮件(-e, --email
)
将指定的电子邮件添加到许可证文本。
如果指定了git
或hg
,它将从这些工具获取电子邮件。
$ policense -l ISC -e git
输出
Copyright (c) 2019, Dawid Potocki <dpot@disroot.org>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
将许可证保存到文件(-s
,--save
)
如果在-s
文件名之后未指定,则默认为LICENSE
。
$ policense -l 0BSD -s COPYING
显示tl;dr of license
$ policense -i BSD-2-Clause
输出(它实际上有黑色)
BSD 2-Clause "Simplified" License
A permissive license similar to the BSD 3-Clause License, but without
a 3rd advertising clause.
FSF Approved ✔
OSI Approved ✔
GPL Compatible ✔
Copyleft ✖
Static Linking ✔
Dynamic Linking ✔
Intended for software
Permissions
Commercial use
Distribution
Modification
Private use
Conditions
License and copyright notice
Limitations
Liability
Warranty
NAQ(从不提问)
Can you add license X?
如果有spdx标识符,那么我看不出问题。 如果你能帮忙就好了。 看CONTRIBUTING.md
常见问题解答(常见问题)
是