Up: Introduction [Index]
licensing
: Licensing utility program.The licensing
program has various commands. To run them, type:
$ licensing COMMAND
Some commands involve the concept of a current working boilerplate, and some do not. The current working boilerplate is a notional block of text representing the boilerplate that the user wants to add to a file. It lets the user easily change the commenting style, or copyright holders before applying a similar boilerplate to another kind of file.
There are commands for creating a current working boilerplate: (see Creating boilerplate)
new-boilerplate
Resets the current working boilerplate. Any previously selected licenses, commenting styles, or copyright holders are thrown out. See new-boilerplate invocation.
choose
Adds or changes the license notice or commenting style for the current working boilerplate. See choose invocation.
copyright
Adds or removes a copyright notice to the current working boilerplate. See copyright invocation.
top-line
Add a beginning line to the current working boilerplate to describe what the file is for. See top invocation.
project
Adds a project-identifying line to the current working boilerplate. See project invocation.
extra
Adds some extra text to the current working boilerplate See extra invocation.
The current working boilerplate can be subsequently written to files: (see Writing boilerplate)
apply
Writes the current working boilerplate to source code files. See apply invocation.
png-apply
Writes the current working boilerplate to .png image files. See png-apply invocation.
notice
Creates and writes a simple boilerplate to a source code file. This command does not reference the current working boilerplate. See notice invocation.
prepend
Adds some arbitrary text to the start of a file. This command does not reference the current working boilerplate. See prepend invocation.
There are a few commands for showing boilerplate in files: (see Scanning for boilerplate)
boilerplate
Show the boilerplate in source code files. This command can also remove the boilerplate from a file. See boilerplate invocation.
cbb
Counts the number of distinct boilerplate blocks in source code files. See cbb invocation.
png-boilerplate
Show the comment in .png image files. This command can also remove the comment from a .png file. See png-boilerplate invocation.
There are commands that display licenses and their notices: (see License commands)
gpl
Shows various verisons of the GNU General Public License notice, or optionally the texts of the full license. See gpl invocation.
lgpl
Shows various verisons of the GNU Lesser General Public License notice, or optionally the texts of the full licenses. See lgpl invocation.
agpl
Shows the GNU Affero General Public License notice, or optionally the texts of the full licenses. See agpl invocation.
fdl
Shows various versions of the GNU Free Documentation License notice, or optionally the text of the full licenses. See fdl invocation.
all-permissive
Shows the GNU All-Permissive license. See all-permissive invocation.
fsf-permissive
Shows the FSF Permissive license. See fsf-permissive invocation.
bsd
Shows various versions of the Berkeley Software Distribution license. See bsd invocation.
apache
Shows the Apache license notice or optionally the full license text. See apache invocation.
mit
Shows the Massachusetts Institute of Technology license. Also known as the X11 License. See mit invocation.
isc
Shows the Internet Systems Consortium license. Also known as the OpenBSD License. See isc invocation.
artistic
Shows the Artistic license notice. See artistic invocation.
epl
Shows the Eclipse Public license notice. See epl invocation.
mpl
Shows the Mozilla Public license notice. See mpl invocation.
zlib
Shows the ZLib license. See zlib invocation.
There are commands that operate on commenting styles: (see Working with comments)
comment
Creates a comment block in a commenting style particular to a programming language. See comment invocation.
And finally there are are a few commands that are informational in nature (see Informational commands that display various bits of information:
preview
Shows the current working boilerplate. See preview invocation.
welcome
Shows the welcome message. See welcome invocation.
warranty
Shows the warranty message. See warranty invocation.
help
Shows help on all of these commands. See help invocation.
When a command is not given as an argument to licensing
, the interactive lu-sh
shell is started. The --quiet option prevents the welcome message from being displayed in the lu-sh shell.
The lu-sh shell is an extended bash shell. The initialization file for lu-sh is automatically generated, and lives in ~/.lu-shrc.
The program state (e.g. the current working boilerplate) is kept in ~/.licensutils/.
All of the licensing
commands work in the lu-sh shell without a licensing
command prefixed to it.
For example:
#!/usr/bin/env lu-sh welcome exit 0
This lu-sh script is equivalent to running the command: licensing welcome
. Although this example shows a lu-sh script, the shell is most often used interactively.
Up: Introduction [Index]