2021-05-26 13:54:36 +00:00
|
|
|
""" Bookmark class """
|
|
|
|
class Bookmark:
|
2021-05-28 17:11:57 +00:00
|
|
|
def __init__(self, page, title, level=1, fit='/FitV'):
|
2021-05-26 13:54:36 +00:00
|
|
|
self.page = page
|
|
|
|
self.title = title
|
|
|
|
self.level = level
|
2021-05-28 15:05:48 +00:00
|
|
|
# default value for now
|
2021-05-28 17:11:57 +00:00
|
|
|
self.fit = fit
|
|
|
|
if (self.fit == '/Fit' or self.fit == '/FitB'):
|
|
|
|
self.cords = []
|
|
|
|
elif (self.fit == '/FitH' or self.fit == '/FitV' or self.fit == '/FitBH' or self.fit == '/FitBV'):
|
|
|
|
self.cords = [(0)]
|
|
|
|
else:
|
|
|
|
self.fit = '/FitB'
|
|
|
|
self.cords = []
|
|
|
|
|
2021-05-26 13:54:36 +00:00
|
|
|
|
|
|
|
def __lt__(self, other):
|
|
|
|
return self.page < other.page
|
|
|
|
|
|
|
|
def __repr__(self):
|
2021-05-28 15:05:48 +00:00
|
|
|
return str([self.page, self.title, self.level])
|