addlicense自动在一个或多个源代码文件的顶部插入指定的许可文件或版权消息
addlicense的Python项目详细描述
添加许可证
addlicense是一个简单的实用程序,它自动在一个或多个源代码文件的顶部插入指定的许可文件或版权消息
usage: addlicense.py [-h] [--licensefile LICENSEFILE]
[--commentblock COMMENTBLOCK] [--comment COMMENT] [-s]
[--backup]
sourcefiles [sourcefiles ...]
Automatically inserts a specified license file or copyright message at the top
of one or more source code files
positional arguments:
sourcefiles a list of files to update with the license or
copyright message
optional arguments:
-h, --help show this help message and exit
--licensefile LICENSEFILE
a file containing the license or copyright text,
defaulting to LICENSE.txt
--commentblock COMMENTBLOCK
a space-separated string indicating the characters to
use at the beginning and end of the license message to
demark them as a comment block
--comment COMMENT a string indicating the characters to use at the
beginning of each line of the license message to
demark them as comments
-s, --skip-shebang-executable
skip the initial shebang executable command: if the
source file starts with a comment symbol (identified
via the --comment option) followed by a shebang, to
indicate an executable script on a POSIX system, then
the license text will be inserted AFTER this initial
line
--backup keep a copy of the original source-file with a .bak
extension
安装
addlicense是用python编写的,您可以使用pip安装程序安装它,因此:
$ pip install addlicense
主页
您可以在https://github.com/hossg/addlicense
找到addlicense的主页