Added support for importing entries.

This commit is contained in:
Gregory Crosswhite 2014-10-24 15:21:10 -07:00
parent 6fed042b8b
commit 6258465f5d
5 changed files with 68 additions and 6 deletions

View file

@ -74,6 +74,9 @@ class Entry:
def __repr__(self):
return "<Entry '{0}' on {1}>".format(self.title.strip(), self.date.strftime("%Y-%m-%d %H:%M"))
def __hash__(self):
return hash(self.__repr__())
def __eq__(self, other):
if not isinstance(other, Entry) \
or self.title.strip() != other.title.strip() \