generated from Hazel/python-project
feat: added chapter limit
This commit is contained in:
parent
1a03ff373d
commit
564e7c38eb
@ -261,11 +261,13 @@ class ScribbleBook:
|
||||
print(str(self))
|
||||
|
||||
self.fetch_chapters(limit=limit_chapters)
|
||||
for chapter in self.chapters[:limit_chapters if limit_chapters is not None else len(self.chapters)]:
|
||||
if limit_chapters is not None:
|
||||
self.chapters = self.chapters[:limit_chapters]
|
||||
|
||||
for chapter in self.chapters:
|
||||
print(str(chapter))
|
||||
chapter.load()
|
||||
|
||||
|
||||
def load_metadata(self) -> None:
|
||||
"""
|
||||
Load the metadata for this object
|
||||
@ -350,3 +352,6 @@ class ScribbleBook:
|
||||
self.chapters.append(chapter)
|
||||
|
||||
self.chapters.sort(key=lambda x: x.index)
|
||||
|
||||
def build(self):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user