fabricatio_novel.models.novel
This module contains the models for the novel.
Classes
A chapter in a novel. |
|
A novel. |
Module Contents
- class fabricatio_novel.models.novel.Chapter(/, **data: Any)
Bases:
fabricatio_core.models.generic.SketchedAble,fabricatio_capabilities.models.generic.PersistentAble,fabricatio_core.models.generic.Titled,fabricatio_capabilities.models.generic.WordCountA chapter in a novel.
- content: str
Raw chapter text. May contain image references like . Converted to XHTML paragraphs in to_xhtml().
- classmethod with_raw_content(raw: str, title: str, expected_word_count: int, chapter_index: int) Self
Create a chapter from raw text. Content stored as-is; XHTML conversion deferred to to_xhtml().
- classmethod from_plan_and_raw_content(chapter_plan: fabricatio_novel.models.plan.ChapterPlan, raw: str) Self
Create a chapter from a chapter plan and raw generated text.
- class fabricatio_novel.models.novel.Novel(/, **data: Any)
Bases:
fabricatio_core.models.generic.SketchedAble,fabricatio_capabilities.models.generic.PersistentAble,fabricatio_core.models.generic.Titled,fabricatio_capabilities.models.generic.WordCountA novel.
- characters: List[fabricatio_character.models.character.CharacterCard] | None = None
Character cards for this novel. Used by illustration pipeline to maintain visual consistency.