For the past month or so, I’ve been doing some consulting with IntraHealth. We’re about to release a sizable webapp under the GPLv3 and one of the tasks is adding the proper headers to the files. Oh, of note, the Free Software Foundation has entered the age of the web. Instead of telling you to “write to the FSF at…”, if you need a copy of the full license, you are told to visit http://www.gnu.org/licenses/. Anyway, there seems to be a real lack of tools to help with this. Sure, there is this ruby script from Xavier Hanin, a one off and, finally, this Perl script. None of these supports PHP. So I grabbed the Perl script, made a couple of changes to add support for the GPLv3 and PHP. Here it is. The tool could really use a lot of improvement. More file types, more licenses, better detection, etc. But, for now, it’ll do.
Re: I did something similar
If you’re distributing the code and you want other people to contribute to a shared repository, then you really need to have the copyright header at the top of every file. See, for example, the kernel source code.
Re: I did something similar
oh, and, any decent editor should be able to elide the headers if that really bothers you.