import uuid
+import pickle
import datetime
import toolbox
class FileManager(object):
- def __init__(self):
+ def __init__(self, filename):
+ self._filename = filename
self._projects = {}
self._items = {}
self._locations = {}
+ def save(self):
+ state = {
+ "projects": self._projects,
+ "items": self._items,
+ "locations": self._locations,
+ }
+ pickle.dump(state, self._filename)
+
+ def load(self):
+ state = pickle.load(self._filename)
+ self._projects = state["projects"]
+ self._items = state["items"]
+ self._locations = state["locations"]
+
def add_project(self, name):
projId = uuid.uuid4().hex
projDetails = {
def __init__(self, username, password, token=None):
pass
+ def save(self):
+ pass
+
+ def load(self):
+ pass
+
def add_project(self, name):
raise NotImplementedError("Not logged in to any ToDo system")
self._timeline = resp.timeline
self._lists = []
+ def save(self):
+ pass
+
+ def load(self):
+ pass
+
def add_project(self, name):
rsp = self._rtm.lists.add(
timeline=self._timeline,