summaryrefslogtreecommitdiff
path: root/GUI.md
blob: c53d706318f7a6336cc58628f9cde2cdceed7b56 (plain)
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
# GUI Mode for TotalRecall

TotalRecall now includes an interactive GUI mode for a more user-friendly flashcard generation experience.

## Prerequisites

The GUI mode requires Fyne, which has the following system dependencies:

### Linux
```bash
# Debian/Ubuntu
sudo apt-get install gcc libgl1-mesa-dev xorg-dev

# Fedora
sudo dnf install gcc mesa-libGL-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel libXxf86vm-devel
```

### macOS
No additional dependencies required (uses system frameworks).

### Windows
No additional dependencies required if using MinGW or similar.

## Running GUI Mode

```bash
./totalrecall --gui
```

## Features

The GUI provides:

1. **Interactive Input**: Enter Bulgarian words one at a time
2. **Live Preview**: See generated images and hear audio pronunciation
3. **Fine-grained Regeneration**: 
   - Regenerate just the image (cycles through different results)
   - Regenerate just the audio (uses a different voice)
   - Regenerate both
4. **Session Management**: Keep track of all generated cards in a session
5. **Export to Anki**: Export all saved cards to CSV format

## GUI Layout

- **Top Section**: Input field for Bulgarian words with submit button
- **Middle Section**: 
  - Image display with navigation (if multiple images)
  - Audio player with play controls
  - Translation display
- **Bottom Section**: Action buttons
  - "New Word" - saves the current card and clears for a new word
  - "Regenerate Image" - gets a new image
  - "Regenerate Audio" - generates with a different voice
  - "Regenerate All" - regenerates everything

## Building from Source

If you're building from source and encounter issues with the GUI:

1. Ensure you have the system dependencies installed (see Prerequisites)
2. The build might take longer the first time as it compiles Fyne
3. If the build times out, try building without the GUI first:
   ```bash
   go build -tags nogui ./cmd/totalrecall
   ```

## Troubleshooting

- **Build fails**: Check that you have the required system dependencies
- **GUI doesn't start**: Ensure you're running in a graphical environment
- **Audio doesn't play**: The current implementation shows audio controls but actual playback requires additional audio libraries