# HG changeset patch # User Jeff Hammel # Date 1322087357 28800 # Node ID ed9d64d1fd3245b6e1456c0f115dbbfe2c1c2259 # Parent c324ae5317abc89fd087d14fbb3f6370f0c6072f stubbing diff -r c324ae5317ab -r ed9d64d1fd32 licenser/licenses.py --- a/licenser/licenses.py Wed Nov 23 14:22:50 2011 -0800 +++ b/licenser/licenses.py Wed Nov 23 14:29:17 2011 -0800 @@ -40,6 +40,18 @@ from datetime import datetime from string import Template +# types of comments + +def asterisk_omments(): + pass + +def hash_comments(): + pass + +type = {'py': hash_comments, + 'sh': hash_comments, + 'c': asterisk_comments} + class License(object): """Abstract base class for a license""" @@ -58,6 +70,10 @@ def print_license(self): print self.license() + def has_license(filename): + """does the file already have a license?""" + raise NotImplementedError + def __call__(self, directory, **kw): variables = self.obtain_variables(**kw) self.interpolate(directory, variables)