feat: added chapter limit

This commit is contained in:
Hazel Noack 2025-06-10 14:23:00 +02:00
parent 1a03ff373d
commit 564e7c38eb

View File

@ -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