From: <cl...@us...> - 2003-10-24 01:12:20
|
Update of /cvsroot/todo-manager/todo-manager In directory sc8-pr-cvs1:/tmp/cvs-serv15027 Modified Files: main.py Log Message: main.py: * Many clean-ups with plugin execution. * Duplicate task lists that are to passed to plugins are created correctly. * Date formats for export plugins are applied to all dates before being passed on. export_html.py, export_text.py: * Updated to work with the changes that were made to main.py * Cleaned up some code that wasn't working too well. This update was prompted by an email I recieved from Tom Churm that stated that HTML export no longer worked. Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- main.py 25 Sep 2003 20:35:47 -0000 1.84 +++ main.py 24 Oct 2003 00:13:17 -0000 1.85 @@ -843,7 +843,7 @@ for n in kw["tasks"]: for t in self.__tasks: if t["Name"] == n: - new_tasks.append(t) + new_tasks.append(t.copy()) else: new_tasks = self.__dup_task_list() @@ -851,6 +851,16 @@ self.__ext_load_file(func=p['function'], desc=p['name'], ext=p['format'], ui=ui) elif p['type'] == 'file_export': + # Convert the time structures into strings + for i in range(len(new_tasks)): + dd = new_tasks[i]["DueDate"] + fd = new_tasks[i]["FinishedDate"] + + if dd != '': + new_tasks[i]["DueDate"] = self.fmttime(dd) + if fd != '': + new_tasks[i]["FinishedDate"] = self.fmttime(fd) + self.__ext_save_file(func=p['function'], desc=p['name'], ext=p['format'], tasks=new_tasks, ui=ui) @@ -885,8 +895,7 @@ new_list = [] for task in list: - dup = task.copy() - new_list.append(dup) + new_list.append(task.copy()) return new_list |