NAME

autorights -- Add copyright notice to source code


SYNOPSIS

perl autorigths.pl -tTEMPLATE [-gPROGRAM] [-aAUTHORS] [-yYEARS] [-hHOLDERS] FILE1 [FILE2 ...]


DESCRIPTION

This software edits your source code. Always backup your data before running this program!

Autorights adds a copyright notice to source files. First, it gets a notice by customizing a template for values such as authors, years, holders and so on. Then it process one or more source files and substitutes any comment block introduced by the word AUTORIGHTS with the customized notice.

The template is a simple ASCII file containing the copyright notice text with paceholders <AUTHORS/>, <YEARS/>, <HOLDERS/>, <PROGRAM/> for the obvious customization. The values of these keys are specified on the command line by means of several options as specified below.

Autorights accepts files and directories as arguments. Files that cannot be mapped by means of their extension to a known source code type are silently skipped (directories are skipped as well if the option -r is not specified).

The option -r can be used to search recursively any specified directory for more source files to process.

To see the copyright notice without actually modifing any file use the -p and -v options together.

Copyiright Notice Template

The copyright notice template is specfied by means of the -t option. It can be either a text file or one of the default templates. These are:

gpl
Standard General Public License notice. This is only a notice: You should still include a copy of GPL with your source code.

cal
Berkeley License notice.

The file itself is a simple ASCII files with placeoholders <AUTHORS/>, <YEARS/>, <HOLDERS/>, <PROGRAM/> for the values to customize.

Caveats

Autorights works by modifying existing source files. Although the program makes a backup copy of each file it modifies, it is a good idea to make a backup of all the data before running the program. In particular, running twice the program will result in the backup copies to be overwritten.


OPTIONS

-h|--help
Print this message.

-v|--verbose
Be verbose.

-p|--pretend
Do not write any file.

-r|--recursive
Scan recursively each directory found.

-t|--template filename
Use the specified template notice.

-a|--authors string
Substitute the tag <AUTHORS/> with this value.

-a|--years string
Substitute the tag <YEARS/> with this value.

-a|--authors string
Substitute the tag <AUTHORS/> with this value.

-h|--holders string
Substitute the tag <HOLDERS/> with this value.

-g|--program string
Substitute the tag <PROGRAM/> with this value.


AUTHOR

Andrea Vedaldi - http://www.cs.ucla.edu/~vedaldi