Up: Introduction   [Contents][Index]


1.1 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.

1.1.1 Commands that create the current working boilerplate

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

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.

1.1.2 Commands that write the current working boilerplate to files

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.

1.1.3 Commands that get boilerplate from files

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.

1.1.4 Commands that display license notices

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.

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.

1.1.5 Other commands that display information

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.

uncomment

Removes comment delimiters from some text in a file. See uncomment 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.

1.1.6 Starting the lush shell

When a command is not given as an argument to licensing, the interactive lush shell is started. The --quiet option prevents the welcome message from being displayed in the lush shell.

The lush shell is an extended bash shell. The initialization file for lush is automatically generated, and lives in ~/.lushrc.

The program state (e.g. the current working boilerplate) is kept in ~/.licensutils/.

All of the licensing commands work in the lush shell without a licensing command prefixed to it.

For example:

#!/usr/bin/env lush
welcome
exit 0

This lush script is equivalent to running the command: licensing welcome. Although this example shows a lush script, the shell is most often used interactively.


Up: Introduction   [Contents][Index]