feat: add intro page, rotated TOC headers, progress indicator, fix TOC padding (Closes #33)

- Add intro/title page before TOC (configurable via intro.enabled in songbook.yaml)
- Rotate reference book column headers 90° in TOC to prevent text truncation
- Add progress callback to SongbookPipeline.build() with CLI and GUI integration
- Make GUI song loading async with spinner indicator
- Fix TOC page padding: use actual rendered page count instead of blindly adding tocPages-1 blank pages
- Pre-render TOC to measure actual pages needed (TocRenderer.measurePages)
- Account for intro pages in pagination offset and page numbering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-03-18 09:45:32 +01:00
parent 9056dbd9cd
commit 3d346e899d
7 changed files with 238 additions and 58 deletions

View File

@@ -9,7 +9,12 @@ data class BookConfig(
val referenceBooks: List<ReferenceBook> = emptyList(),
val output: OutputConfig = OutputConfig(),
val foreword: ForewordConfig? = null,
val toc: TocConfig = TocConfig()
val toc: TocConfig = TocConfig(),
val intro: IntroConfig? = null
)
data class IntroConfig(
val enabled: Boolean = true
)
data class TocConfig(

View File

@@ -14,6 +14,7 @@ sealed class PageContent {
}
data class LayoutResult(
val introPages: Int = 0,
val tocPages: Int,
val pages: List<PageContent>,
val tocEntries: List<TocEntry>