diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-03 13:15:44 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-03 13:15:44 +0300 |
| commit | b819475635eec77c72ab1b3ec0793dd59f750013 (patch) | |
| tree | a2fa6459b8eacdbc7314b97f4ee459ec8e6eb291 /cmd | |
| parent | 5a526a59bc650576d69c1f358449230e7751eb6d (diff) | |
feat: add --story cinematic narration and comic strip generation
- Generates a ~500-word Bulgarian vocabulary story from a batch file
- Produces 3 comic pages via NanoBanana (90% ultra-realistic style)
- Art style chosen randomly per run; override with --story-style
- Cinematic Gemini TTS narration saved as story_narration.mp3
- Random voice from curated pool (Charon, Fenrir, Enceladus, Algieba, Aoede, Schedar)
- Override narrator voice with --narrator-voice
- Falls back to story_tts_todo.txt if narration fails
- No new API key required — reuses existing GOOGLE_API_KEY
- Bump version to 0.9.4
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/totalrecall/main.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmd/totalrecall/main.go b/cmd/totalrecall/main.go index b1ed51c..5363190 100644 --- a/cmd/totalrecall/main.go +++ b/cmd/totalrecall/main.go @@ -13,6 +13,7 @@ import ( "codeberg.org/snonux/totalrecall/internal/gui" "codeberg.org/snonux/totalrecall/internal/models" "codeberg.org/snonux/totalrecall/internal/processor" + "codeberg.org/snonux/totalrecall/internal/story" ) func main() { @@ -56,6 +57,22 @@ func runCommand(cmd *cobra.Command, args []string, flags *cli.Flags) error { return lister.ListAvailableModels() } + // Handle --story flag: generate a vocabulary story + comic image into CWD. + // This is deliberately placed before processor creation because it does not + // need the full processor pipeline (no Anki cards, no per-word audio). + if flags.StoryFile != "" { + runner := story.NewRunner(&story.RunnerConfig{ + APIKey: cli.GetGoogleAPIKey(), + TextModel: flags.NanoBananaTextModel, + ImageModel: flags.NanoBananaModel, + ImageTextModel: flags.NanoBananaTextModel, + OutputDir: ".", + Style: flags.StoryStyle, + NarratorVoice: flags.NarratorVoice, + }) + return runner.Run(flags.StoryFile) + } + // Auto-adjust image size for DALL-E 3 if flags.OpenAIImageModel == "dall-e-3" && !cmd.Flags().Changed("openai-image-size") { // If user didn't explicitly set size, use 1024x1024 for DALL-E 3 |
