Next: , Up: Informational commands   [Index]


7.1 preview: Show the current working boilerplate

The current working boilerplate is sort of a notional concept. It doesn’t exist as a file anywhere until the preview command generates it. The preview command simply displays the current working boilerplate on the standard output.

It will fail to display when license has not been selected (with the choose command, see choose invocation), or a copyright holder hasn’t been specified yet (with the copyright command, see copyright invocation.)

Here is an example of the preview command:

$ licensing choose all-permissive
Selected.
$ licensing copyright Yoyodyne, Inc. 2001  --quiet
$ licensing preview
Copyright (C) 2001 Yoyodyne, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.

In this example we see the preview command displaying a simple all-permisive boilerplate.

It is natural to run this command often after making changes to the current working boilerplate. To see which commands can change the current working boilerplate see Creating boilerplate. Some users may wish to pipe the output of preview through less when it is large; for example: ‘licesning preview | less’.

The --no-commenting-style option is used to display the current working boilerplate in an uncommented form, even when a commenting-style has already been specified.

The apply and png-apply commands rely on the preview command to generate the current working boilerplate before writing it to files.