Autorights automatically adds a copyright notice to several source files at once.
Autorights processes source files
(C/C++/SH/PL/...) looking for commet blocks introduced
by the line AUTORIGHTS and substituting
them with a copyright notice. The notice is derived
from a template (either read from a file or chosen
among the pre-defined ones) customized for authors,
holders, years and so on.
The program can also process recursively whole directories.
Download and install
The archive contains a single Perl script implementing autorights, plus a Makefile to generate the documentation. The script can be moved anywhere.
Example
Consider the C source filetest.c
/* AUTORIGHTS */
int main(int argc, char** argv)
{
return 0 ;
}
Then
> perl autorights.pl test.c \
--template=gpl \
--authors "Andrea Vedaldi" \
--holders "Andrea Vedaldi" \
--program "TEST" \
--years 2006
modifies test.c to
/* AUTORIGHTS
Copyright (C) 2006 Andrea Vedaldi
This file is part of TEST.
TEST is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
int main(int argc, char** argv)
{
return 0 ;
}