def filter(self): if self.all: logger.info("No filter applied") self.filteredList = self.fileList elif not self.doctype is None: logger.log("Selecting DocType files...") self.filteredList = util.filterDocType(self.fileList, self.doctype) else: logger.log("Filtering file types...") self.filteredList = util.filterList(self.fileList) for itempath in self.filteredList: item = util.getFileType(itempath) if item not in self.extList: self.extList.append(item)
def load(self, itempath): for plugin in self.manager.getAllPlugins(): if plugin.name == util.getFileType(itempath).upper(): return plugin.plugin_object.load(itempath) plugin = self.manager.getPluginByName("DEFAULT") return plugin.plugin_object.load(itempath)