diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-16 23:24:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-16 23:24:39 +0300 |
| commit | b2b007699b2a42ed86970f59d597034679265e91 (patch) | |
| tree | 4c3167cdece1ee181f92bc1a14b0e17e00db7c0c /cmd | |
| parent | e2e75315e5e7c3eaccdc38881bd2fa669bb9dda5 (diff) | |
Remove Pixabay and Unsplash image search support
- Delete Pixabay and Unsplash implementation files
- Remove API key configuration for both services
- Update CLI and GUI to only support OpenAI DALL-E
- Update documentation to reflect OpenAI as sole image provider
- Fix tests to handle nil client in OpenAI implementation
- Simplify configuration examples
The application now exclusively uses OpenAI DALL-E for image generation,
providing AI-generated educational images with creative art styles.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/totalrecall/main.go | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/cmd/totalrecall/main.go b/cmd/totalrecall/main.go index e6b74a0..83695e8 100644 --- a/cmd/totalrecall/main.go +++ b/cmd/totalrecall/main.go @@ -77,7 +77,7 @@ func init() { // Local flags rootCmd.Flags().StringVarP(&outputDir, "output", "o", "./anki_cards", "Output directory") rootCmd.Flags().StringVarP(&audioFormat, "format", "f", "mp3", "Audio format (wav or mp3)") - rootCmd.Flags().StringVar(&imageAPI, "image-api", "openai", "Image source (pixabay, unsplash, or openai)") + rootCmd.Flags().StringVar(&imageAPI, "image-api", "openai", "Image source (only openai supported)") rootCmd.Flags().StringVar(&batchFile, "batch", "", "Process words from file (one per line)") rootCmd.Flags().BoolVar(&skipAudio, "skip-audio", false, "Skip audio generation") rootCmd.Flags().BoolVar(&skipImages, "skip-images", false, "Skip image download") @@ -360,20 +360,6 @@ func downloadImages(word string) error { var err error switch imageAPI { - case "pixabay": - apiKey := viper.GetString("image.pixabay_key") - searcher = image.NewPixabayClient(apiKey) - - case "unsplash": - apiKey := viper.GetString("image.unsplash_key") - if apiKey == "" { - return fmt.Errorf("Unsplash API key is required in config") - } - searcher, err = image.NewUnsplashClient(apiKey) - if err != nil { - return err - } - case "openai": // Create OpenAI image configuration openaiConfig := &image.OpenAIConfig{ @@ -410,9 +396,7 @@ func downloadImages(word string) error { searcher = image.NewOpenAIClient(openaiConfig) if openaiConfig.APIKey == "" { - fmt.Printf("Warning: OpenAI API key not found, falling back to Pixabay for images\n") - imageAPI = "pixabay" - searcher = image.NewPixabayClient("") + return fmt.Errorf("OpenAI API key is required for image generation") } default: @@ -716,8 +700,6 @@ func runGUIMode() error { ImageProvider: imageAPI, EnableCache: viper.GetBool("cache.enable"), OpenAIKey: getOpenAIKey(), - PixabayKey: viper.GetString("image.pixabay_key"), - UnsplashKey: viper.GetString("image.unsplash_key"), } // Create and run GUI application |
