示例#1
0
    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_')
示例#2
0
    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_')
示例#3
0
    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))
示例#4
0
    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(' ')
示例#5
0
    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(' ')