# HG changeset patch # User Jeff Hammel # Date 1322085395 28800 # Node ID 697b6f892e12c5c6d8bdc56974b82075a3ef5f7a # Parent a8ad01735f7131f5ba3dc6a06cfb7088d132d26d get this working in basic form diff -r a8ad01735f71 -r 697b6f892e12 licenser/licenses.py --- a/licenser/licenses.py Tue Nov 22 17:41:21 2011 -0800 +++ b/licenser/licenses.py Wed Nov 23 13:56:35 2011 -0800 @@ -149,7 +149,7 @@ contributor_index = index assert contributor_index - lines[contibutor_index] = ' ${author} <${email}>' + lines.insert(contributor_index+1, ' ${author} <${email}>') return '\n'.join(lines) def pre(self, variables): diff -r a8ad01735f71 -r 697b6f892e12 licenser/main.py --- a/licenser/main.py Tue Nov 22 17:41:21 2011 -0800 +++ b/licenser/main.py Wed Nov 23 13:56:35 2011 -0800 @@ -2,27 +2,27 @@ # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# +# # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ -# +# # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. -# +# # The Original Code is mozilla.org code. -# +# # The Initial Developer of the Original Code is # Mozilla.org. # Portions created by the Initial Developer are Copyright (C) 2010 # the Initial Developer. All Rights Reserved. -# +# # Contributor(s): # Jeff Hammel (Original author) -# +# # Alternatively, the contents of this file may be used under the terms of # either of the GNU General Public License Version 2 or later (the "GPL"), # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -34,7 +34,7 @@ # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. -# +# # ***** END LICENSE BLOCK ***** """ adds licenses to python packages @@ -71,9 +71,7 @@ def main(args=sys.argv[1:]): usage = '%prog [options] directory' parser = OptionParser(usage, description=__doc__) -# parser.add_option('-d', '--debug', action='store_true', default=False, -# help="debug the application") - parser.add_option('-l', '--license', + parser.add_option('-l', '--license', dest='license', default='MPL', help="license to use") parser.add_option('--list', action='store_true', default=False, help="list available licenses")