diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-20 22:18:57 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-20 22:18:57 +0300 |
| commit | e580fb57a29ec3c3f3e180b20cfa6ec28687689b (patch) | |
| tree | de74f04450b830268e4c1644a91acb9fd45c3802 /internal/cli/flags.go | |
| parent | 9e3328a6aaefe4bd1aa0ec3e8bf6e93d6033180b (diff) | |
Refactor main.go into focused packages
- Reduced main.go from 961 lines to 89 lines (91% reduction)
- Created new packages for better separation of concerns:
- cli: Command-line interface setup and configuration
- processor: Core word processing logic and orchestration
- batch: Batch file processing functionality
- translation: Bulgarian to English translation services
- models: OpenAI model listing functionality
- phonetic: Phonetic information fetching
- Each package has clear documentation in doc.go files
- Improved testability and maintainability
- All existing functionality preserved
- All tests passing and build successful
Diffstat (limited to 'internal/cli/flags.go')
| -rw-r--r-- | internal/cli/flags.go | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/internal/cli/flags.go b/internal/cli/flags.go new file mode 100644 index 0000000..64575a0 --- /dev/null +++ b/internal/cli/flags.go @@ -0,0 +1,46 @@ +package cli + +// Flags holds all command-line flag values +type Flags struct { + // General flags + CfgFile string + OutputDir string + AudioFormat string + ImageAPI string + BatchFile string + SkipAudio bool + SkipImages bool + GenerateAnki bool + AnkiCSV bool + DeckName string + ListModels bool + AllVoices bool + GUIMode bool + + // OpenAI flags + OpenAIModel string + OpenAIVoice string + OpenAISpeed float64 + OpenAIInstruction string + + // OpenAI Image flags + OpenAIImageModel string + OpenAIImageSize string + OpenAIImageQuality string + OpenAIImageStyle string +} + +// NewFlags creates a new Flags instance with default values +func NewFlags() *Flags { + return &Flags{ + AudioFormat: "mp3", + ImageAPI: "openai", + DeckName: "Bulgarian Vocabulary", + OpenAIModel: "gpt-4o-mini-tts", + OpenAISpeed: 0.9, + OpenAIImageModel: "dall-e-3", + OpenAIImageSize: "1024x1024", + OpenAIImageQuality: "standard", + OpenAIImageStyle: "natural", + } +} |
