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")
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)
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")
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)
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)