diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-21 15:06:01 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-21 15:06:01 +0300 |
| commit | f3e301168ad742a556b336761e28f739eb1d7143 (patch) | |
| tree | 36992608c8ddaab8b5d44221d4eab6f98eb5c8b9 /internal/cli/command.go | |
| parent | b562f3b57f8e4f106aad8856e55b51f1d9d9a367 (diff) | |
feat: improve consistency between CLI and GUI modes
- Fix batch mode to store cards in ~/.local/state/totalrecall/cards/ matching GUI behavior
- Add --no-auto-play flag to disable automatic audio playback (enabled by default)
- Simplify phonetic fetching in CLI to match GUI (IPA only, no detailed explanations)
- Remove redundant --gui flag as GUI is already the default mode
- Align image generation settings: both modes now use DALL-E 2 with 512x512 resolution
🤖 Generated with [opencode](https://opencode.ai)
Co-Authored-By: opencode <noreply@opencode.ai>
Diffstat (limited to 'internal/cli/command.go')
| -rw-r--r-- | internal/cli/command.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/cli/command.go b/internal/cli/command.go index 6f9f1c0..81f9914 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -24,8 +24,7 @@ representative images from web search APIs. Examples: totalrecall # Launch interactive GUI (default) totalrecall ябълка # Generate materials for "apple" via CLI - totalrecall --batch words.txt # Process multiple words from file - totalrecall --gui # Explicitly launch GUI mode`, + totalrecall --batch words.txt # Process multiple words from file`, Args: cobra.MaximumNArgs(1), Version: internal.Version, } @@ -37,9 +36,9 @@ Examples: } func setupFlags(cmd *cobra.Command, flags *Flags) { - // Set default output directory + // Set default output directory to match GUI mode home, _ := os.UserHomeDir() - defaultOutputDir := filepath.Join(home, "Downloads") + defaultOutputDir := filepath.Join(home, ".local", "state", "totalrecall", "cards") // Global flags cmd.PersistentFlags().StringVar(&flags.CfgFile, "config", "", "config file (default is $HOME/.totalrecall.yaml)") @@ -56,7 +55,7 @@ func setupFlags(cmd *cobra.Command, flags *Flags) { cmd.Flags().StringVar(&flags.DeckName, "deck-name", flags.DeckName, "Deck name for APKG export") cmd.Flags().BoolVar(&flags.ListModels, "list-models", false, "List available OpenAI models for the current API key") cmd.Flags().BoolVar(&flags.AllVoices, "all-voices", false, "Generate audio in all available voices (creates multiple files)") - cmd.Flags().BoolVar(&flags.GUIMode, "gui", false, "Launch interactive GUI mode") + cmd.Flags().BoolVar(&flags.NoAutoPlay, "no-auto-play", false, "Disable automatic audio playback in GUI mode (auto-play is enabled by default)") // OpenAI flags cmd.Flags().StringVar(&flags.OpenAIModel, "openai-model", flags.OpenAIModel, "OpenAI TTS model: tts-1, tts-1-hd, gpt-4o-mini-tts") |
