feat: add support for foreword/preface pages (Closes #1) #8

Merged
shahondin1624 merged 1 commits from feature/issue-1-add-support-for-foreword-preface-pages into main 2026-03-17 09:28:45 +01:00

Summary

  • Adds ForewordConfig to BookConfig with a file path pointing to a foreword text file
  • New Foreword model type and ForewordParser that parses text files with quote (> ), paragraph, separator (---), and signature (-- ) sections
  • New PageContent.ForewordPage variant integrated into the pipeline (inserted after TOC, before song pages)
  • PDF rendering with bold-styled quote, horizontal rule separator, word-wrapped body paragraphs, and right-aligned signatures
  • 10 new tests covering foreword parsing and config parsing
  • Gradle wrapper and JDK 25 compatibility adjustments

Test plan

  • All existing tests pass (gradle test)
  • ForewordParserTest covers: full foreword, no quote, no signatures, empty, only paragraphs, multi-line paragraph, only quote, multiple signatures
  • ConfigParserTest covers: foreword config parsing, null foreword when absent

Closes #1

## Summary - Adds `ForewordConfig` to `BookConfig` with a `file` path pointing to a foreword text file - New `Foreword` model type and `ForewordParser` that parses text files with quote (`> `), paragraph, separator (`---`), and signature (`-- `) sections - New `PageContent.ForewordPage` variant integrated into the pipeline (inserted after TOC, before song pages) - PDF rendering with bold-styled quote, horizontal rule separator, word-wrapped body paragraphs, and right-aligned signatures - 10 new tests covering foreword parsing and config parsing - Gradle wrapper and JDK 25 compatibility adjustments ## Test plan - [x] All existing tests pass (`gradle test`) - [x] ForewordParserTest covers: full foreword, no quote, no signatures, empty, only paragraphs, multi-line paragraph, only quote, multiple signatures - [x] ConfigParserTest covers: foreword config parsing, null foreword when absent Closes #1
shahondin1624 added 1 commit 2026-03-17 09:27:31 +01:00
Add ForewordConfig to BookConfig, Foreword model type, ForewordParser for
text files (quote/paragraphs/signatures), ForewordPage in PageContent,
pipeline integration to insert foreword after TOC, and PDF rendering with
styled quote, horizontal rule separator, word-wrapped paragraphs, and
right-aligned signatures.

Also adds Gradle wrapper and adjusts build toolchain for JDK 25 compat.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit 8e4728c55a into main 2026-03-17 09:28:45 +01:00
shahondin1624 deleted branch feature/issue-1-add-support-for-foreword-preface-pages 2026-03-17 09:28:45 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#8