diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-21 23:22:38 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-21 23:22:38 +0300 |
| commit | bc1c6e76d5a6ef2623d26d277473c459dd699f81 (patch) | |
| tree | 3bc0c7b4b730d50fb15ae38458037fe2f8ac4b2f /internal/processor/processor_test.go | |
| parent | a43d503533f301db43af412167fda26364542e27 (diff) | |
feat: Enhanced bulk import, archive functionality, and export improvements
## Bulk Import Enhancements
- Added support for three flexible batch file formats:
- `BULGARIAN = ENGLISH` - Both provided, no translation needed
- `= ENGLISH` - Only English provided, auto-translated to Bulgarian
- `BULGARIAN` - Only Bulgarian provided, auto-translated to English
- Implemented smart file checking to skip already processed words
- Check all required files (word.txt, translation.txt, phonetic.txt, audio/image files and their attribution/metadata)
- Added batch processing summary with statistics
## Archive Functionality
- Renamed --clear flag to --archive for clarity
- Archive cards directory to ~/.local/state/totalrecall/archive/cards-TIMESTAMP
- Added archive button to GUI toolbar with folder icon
- Archive confirmation dialog supports keyboard shortcuts (y/n/c/ESC)
## Export Improvements
- Anki exports now show full file path in output
- Changed default export location to home directory (~) for both CLI and GUI
- Auto-adjust image size to 1024x1024 when DALL-E 3 is selected
## Other Improvements
- Added TranslateEnglishToBulgarian method for reverse translation
- Enhanced batch processing with better error handling and progress reporting
- Improved file integrity checking for complete word processing
π€ Generated with [opencode](https://opencode.ai)
Co-Authored-By: opencode <noreply@opencode.ai>
Diffstat (limited to 'internal/processor/processor_test.go')
| -rw-r--r-- | internal/processor/processor_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processor/processor_test.go b/internal/processor/processor_test.go index 3a90a05..26ab71b 100644 --- a/internal/processor/processor_test.go +++ b/internal/processor/processor_test.go @@ -208,7 +208,7 @@ func TestGenerateAnkiFile(t *testing.T) { p.translationCache.Add("ΡΠ±ΡΠ»ΠΊΠ°", "apple") p.translationCache.Add("ΠΊΠΎΡΠΊΠ°", "cat") - err := p.GenerateAnkiFile() + _, err := p.GenerateAnkiFile() if err != nil { t.Errorf("GenerateAnkiFile failed: %v", err) } @@ -240,7 +240,7 @@ func TestGenerateAnkiFile_APKG(t *testing.T) { os.WriteFile(filepath.Join(word1Dir, "ΡΠ±ΡΠ»ΠΊΠ°.mp3"), []byte("audio1"), 0644) os.WriteFile(filepath.Join(word2Dir, "ΠΊΠΎΡΠΊΠ°.mp3"), []byte("audio2"), 0644) - err := p.GenerateAnkiFile() + _, err := p.GenerateAnkiFile() if err != nil { t.Errorf("GenerateAnkiFile (APKG) failed: %v", err) } |
