summaryrefslogtreecommitdiff
path: root/internal/story/runner.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-04 11:25:11 +0300
committerPaul Buetow <paul@buetow.org>2026-04-04 11:25:11 +0300
commit03f2ca528a34a7e099f1db8d5a931136af2a4652 (patch)
tree9a6f79220e85e3bacbb0e693ad7504529269ceae /internal/story/runner.go
parent793d7b3c61a403a8c03f1eb44df741c6951444e8 (diff)
feat: random ultra-realistic/comic style, --no-ultra-realistic flag, updated READMEv0.13.0
- Random 50/50 rendering mode per run (ultra-realistic or standard comic style) - --no-ultra-realistic flag forces standard comic style when set - renderingRequirement const centralised and applied to all image prompts via DRY renderReq() method - Log rendering mode chosen at generation time - Update README: correct page count (10), output filenames, all --story flags documented - Bump version to 0.13.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/story/runner.go')
-rw-r--r--internal/story/runner.go20
1 files changed, 15 insertions, 5 deletions
diff --git a/internal/story/runner.go b/internal/story/runner.go
index 107e584..3299d59 100644
--- a/internal/story/runner.go
+++ b/internal/story/runner.go
@@ -40,6 +40,10 @@ type RunnerConfig struct {
// adventure with aliens and spaceships"). Passed verbatim as the genre line in the
// Gemini story prompt so the model writes in that genre instead of a random one.
Theme string
+ // UltraRealistic controls whether the renderingRequirement photorealistic
+ // instruction is injected into every image prompt.
+ // nil → random 50/50 each run; true → always on; false → always off (--no-ultra-realistic).
+ UltraRealistic *bool
// NarratorVoice picks a specific Gemini cinematic voice for narration.
// Empty → random pick from the curated cinematic pool each run.
NarratorVoice string
@@ -61,6 +65,8 @@ func NewRunner(config *RunnerConfig) *Runner {
}
var apiKey, textModel, imageModel, imageTextModel, style, theme, narratorVoice string
+ // Resolve ultraRealistic: nil config or nil pointer → random 50/50 pick each run.
+ ultraRealistic := pickUltraRealistic()
if config != nil {
apiKey = config.APIKey
textModel = config.TextModel
@@ -69,6 +75,9 @@ func NewRunner(config *RunnerConfig) *Runner {
style = config.Style
theme = config.Theme
narratorVoice = config.NarratorVoice
+ if config.UltraRealistic != nil {
+ ultraRealistic = *config.UltraRealistic
+ }
}
// Narrator init failure (e.g. missing key) is non-fatal — handleNarration
@@ -89,11 +98,12 @@ func NewRunner(config *RunnerConfig) *Runner {
Theme: theme,
}),
artist: NewArtist(&ArtistConfig{
- APIKey: apiKey,
- Model: imageModel,
- TextModel: imageTextModel,
- OutputDir: dir,
- Style: style,
+ APIKey: apiKey,
+ Model: imageModel,
+ TextModel: imageTextModel,
+ OutputDir: dir,
+ Style: style,
+ UltraRealistic: ultraRealistic,
}),
narrator: narrator,
}