예제 #1
0
파일: template.py 프로젝트: aparo/crawley
    def set_up(self, project_name):
        """
            Setups a crawley's template project
        """

        BaseProject.set_up(self, project_name)

        generate_template("template", project_name, self.project_dir, new_extension=".crw")
        generate_template("config", project_name, self.project_dir, new_extension=".ini")
예제 #2
0
파일: code.py 프로젝트: wgfi110/crawley
    def set_up(self, project_name, **kwargs):
        """
            Setups a code project.
            Generates the crawlers and models files based on a template.
        """

        BaseProject.set_up(self, project_name, **kwargs)

        generate_template("models", project_name, self.project_dir)
        generate_template("crawlers", project_name, self.project_dir)
예제 #3
0
    def _generate_templates(self, project_name):

        generate_template("template",
                          project_name,
                          self.project_dir,
                          new_extension=".crw")
        generate_template("config",
                          project_name,
                          self.project_dir,
                          new_extension=".ini")
예제 #4
0
파일: base.py 프로젝트: aparo/crawley
    def set_up(self, project_name):
        """
            Setups a crawley project
        """

        self._create_module(project_name)
        self._write_meta_data(project_name)
        generate_template("settings", project_name, project_name)

        self.project_dir = os.path.join(project_name, project_name)
        self._create_module(self.project_dir)
예제 #5
0
파일: base.py 프로젝트: 4iji/crawley
    def set_up(self, project_name, base_dir=None):
        """
            Setups a crawley project
        """

        main_module = project_name

        if base_dir is not None:
            main_module = os.path.join(base_dir, project_name)

        self._create_module(main_module)
        self._write_meta_data(main_module)

        generate_template("settings", project_name, main_module)

        self.project_dir = os.path.join(main_module, project_name)

        self._create_module(self.project_dir)
예제 #6
0
파일: base.py 프로젝트: wgfi110/crawley
    def set_up(self, project_name, base_dir=None):
        """
            Setups a crawley project
        """

        main_module = project_name

        if base_dir is not None:
            main_module = os.path.join(base_dir, project_name)

        self._create_module(main_module)
        self._write_meta_data(main_module)

        generate_template("settings", project_name, main_module)

        self.project_dir = os.path.join(main_module, project_name)

        self._create_module(self.project_dir)
예제 #7
0
파일: template.py 프로젝트: 4iji/crawley
    def _generate_templates(self, project_name):

        generate_template("template", project_name, self.project_dir, new_extension=".crw")
        generate_template("config", project_name, self.project_dir, new_extension=".ini")