def __init__(self, content=None, inflector=English): Base.__init__(self, inflector) self.prefix = 'com_' self.template_path = 'component/basic' if content is not None: self.name = content self.fullname = self.inflector.underscore(self.prefix + self.name) else: self.fullname = self.inflector.underscore( Project().get_project_name()) self.name = self.inflector.humanize(self.fullname, prefix='com_')
def __init__(self, content=None, inflector=English): Base.__init__(self, inflector) self.prefix = 'pkg_' self.template_path = 'package' if content is not None: self.name = content self.fullname = self.inflector.underscore(self.prefix + content) else: self.fullname = self.inflector.underscore( Project().get_project_name()) self.name = self.inflector.humanize(self.fullname, prefix='pkg_') self.path(os.path.join(Project().root(), self.fullname))
def __init__(self, content=None, inflector=English): Base.__init__(self, inflector) self.prefix = 'plg_' self.template_path = 'plugin' if content is not None: self.group, self.name = self.inflector.humanize(content, prefix='plg_') \ .split(' ') self.fullname = self.inflector.underscore( self.inflector.variablize(self.prefix + self.group + ' ' + self.name)) else: self.fullname = self.inflector.underscore( Project().get_project_name()) self.group, self.name = self.inflector.humanize(self.fullname, prefix='plg_') \ .split(' ')