Generate reviews from import data.

This commit is contained in:
Adam Kelly
2020-04-01 15:41:19 +01:00
parent 1a5af7899b
commit 9933dbba54
2 changed files with 14 additions and 0 deletions

View File

@ -88,6 +88,14 @@ class GoodreadsItem:
if self.line['Exclusive Shelf']:
return GOODREADS_SHELVES[self.line['Exclusive Shelf']]
@property
def review(self):
return self.line['My Review']
@property
def rating(self):
return int(self.line['My Rating'])
def __repr__(self):
return "<GoodreadsItem {!r}>".format(self.line['Title'])