« | Main | »

June 07, 2009

insertcopyright 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:
insert_copyright.tar.gz
To use it you first create your copyright file in ~/.copyright; you can also pass in onto the command line with the -f switch, such as:
insert_copyright -r copyright.txt...
Then pass it any of the following files, determined by file extension or interpreter declaration at the top fo the file, and the copyright contained in you copyright will be inserted, if it doesn't already exist there.
Ruby / ruby,rb / ruby
PHP / php,inc / php
Shellscript / bash,sh,tcsh,ash / bash,sh,tcsh,ash
Perl / perl,pl / perl
Python / py,jython,python / python,jython
ML / ml,sml / ml
Java / java / 
Javascript / js / 
C / c,cc,cpp,cs / 
HTML / html,htm / 
Scheme / ss,scm / scheme,mzc
Lisp / lsp,lisp / lisp


Posted by jeff at June 7, 2009 02:53 AM