def getTaskList(self, checkForUpdate=True): import taskProcessor.taskList as tl import os if self.TaskList: if all([self.AutoUpdate, checkForUpdate]): self.updateFromTemplate() return tl.TaskList.fromJson(self.TaskList) else: templateRoots = tl.getTaskTemplates() for t in templateRoots: for tt in templateRoots[t]: if os.path.basename(tt).split(".")[0] == self.TagType: filePath = os.path.join(t, tt) return tl.TaskList.fromFile(filePath)
def getCachedTemplates(): import taskProcessor.taskList as taskList templates = taskList.getTaskTemplates() return templates