This is a little Ruby system to insert copyrights into your source files based on a set copyright contained somewhere on your hard drive. The source and 60 test files are here, though the main file is insert-copyright.rb:
To use it you first create your copyright file
~/.copyright; you can also pass in onto the command
line with the
-f switch, such as:
insert_copyright -r copyright.txt...
Mine looks like this:
Copyright (C) %YEAR% Jeffrey Palm. All rights reserved.
As you can see there is a
%YEAR declaration that will
be substituted with the current year. The other substitutions
%DATETIME%. After this you simply pass it any of
the following types of files (generated by passing in
-h switch); and these are of the
The idea is that you can pass in whatever kind of file, first determined by file extension, then by interpreter declaration in the start of the file, such as