1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
package cli
import "codeberg.org/snonux/totalrecall/internal/audio"
const (
defaultNanoBananaModel = "gemini-3.1-flash-image-preview"
defaultNanoBananaTextModel = "gemini-2.5-flash"
)
// Flags holds all command-line flag values
type Flags struct {
// General flags
CfgFile string
OutputDir string
AudioFormat string
// AudioFormatSpecified records whether the audio format was explicitly set on the CLI.
AudioFormatSpecified bool
// AudioProvider selects the text-to-speech backend ("gemini" or "openai").
AudioProvider string
ImageAPI string
ImageAPISpecified bool
BatchFile string
StoryFile string // --story <file>: generate vocabulary story + comic image
StoryStyle string // --story-style: override the random art style (empty = random)
StoryTheme string // --story-theme: override the random genre pick (empty = random)
StoryNoUltraRealistic bool // --no-ultra-realistic: disable photorealistic rendering requirement
StorySlug string // --story-slug: force a specific output slug/directory (empty = auto from title)
NarratorVoice string // --narrator-voice: Gemini voice for cinematic narration (empty = random)
VideoEnabled bool // --video: whether to prompt for Veo video generation after --story completes
SkipAudio bool
SkipImages bool
GenerateAnki bool
AnkiCSV bool
DeckName string
ListModels bool
AllVoices bool
NoAutoPlay bool
Archive bool
// OpenAI flags
OpenAIModel string
OpenAIVoice string
OpenAISpeed float64
OpenAIInstruction string
// OpenAI Image flags
OpenAIImageModel string
OpenAIImageSize string
OpenAIImageQuality string
OpenAIImageStyle string
// Gemini audio flags
// GeminiTTSModel is the Gemini TTS model used when Gemini audio is selected.
GeminiTTSModel string
// GeminiVoice selects a specific Gemini voice; empty picks a random Gemini voice.
GeminiVoice string
// NanoBananaModel is the Gemini image model used for Nano Banana generation.
NanoBananaModel string
// NanoBananaModelSpecified records whether the Nano Banana image model was explicitly set on the CLI.
NanoBananaModelSpecified bool
// NanoBananaTextModel is the Gemini text model used for Nano Banana prompt generation.
NanoBananaTextModel string
// NanoBananaTextModelSpecified records whether the Nano Banana text model was explicitly set on the CLI.
NanoBananaTextModelSpecified bool
}
// NewFlags creates a new Flags instance with default values
func NewFlags() *Flags {
defaults := audio.DefaultProviderConfig()
return &Flags{
AudioFormat: defaults.OutputFormat,
AudioProvider: defaults.Provider,
ImageAPI: "nanobanana",
VideoEnabled: true,
DeckName: "Bulgarian Vocabulary",
OpenAIModel: "gpt-4o-mini-tts",
OpenAISpeed: 0.9,
OpenAIImageModel: "dall-e-2",
OpenAIImageSize: "512x512",
OpenAIImageQuality: "standard",
OpenAIImageStyle: "natural",
GeminiTTSModel: defaults.GeminiTTSModel,
NanoBananaModel: defaultNanoBananaModel,
NanoBananaTextModel: defaultNanoBananaTextModel,
}
}
|