TestBuddy stores all settings in testbuddy.ini (auto-generated on first run). This guide explains each configuration option.
Standard INI format with sections:
[section_name]
setting_name = valueLocation of Tesseract-OCR executable.
- Default:
C:\Program Files\Tesseract-OCR\tesseract.exe - Example:
C:\Custom\Path\tesseract.exe - Note: Required for OCR to work
OCR language(s) to recognize. Use ISO 639-3 codes.
- Default:
eng(English) - Single:
fra(French only) - Multiple:
eng+fra+deu(English + French + German) - All:
osd(auto-detect) - Common Codes:
eng— Englishfra— Frenchdeu— Germanspa— Spanishjpn— Japanesechi_sim— Simplified Chinesechi_tra— Traditional Chineseara— Arabic- Full list: https://github.com/UB-Mannheim/tesseract/wiki/Data-Files
Page Segmentation Mode — how Tesseract analyzes page layout.
- 0: OSD only (Orientation and Script Detection)
- 1: Auto with OSD
- 3: Fully automatic (DEFAULT)
- 6: Assume single uniform block of text (RECOMMENDED)
- 11: Sparse text (good for receipts/forms)
- 13: Raw line (treat as single line)
- Test different values if results are poor
OCR Engine Mode — Tesseract's processing engine.
- 0: Legacy engine only
- 1: Neural net LSTM only
- 2: Legacy + LSTM (Default)
- 3: LSTM + Legacy (BEST - uses both)**
- Note: Requires LSTM training data for languages
Main window width in pixels.
- Default:
900 - Minimum:
700 - Recommended:
900-1200
Main window height in pixels.
- Default:
600 - Minimum:
500 - Recommended:
600-800
Keep window on top of all other windows.
- Default:
True - Options:
True,False - Useful for: Multitasking, quick captures
UI color theme.
- Default:
light - Options:
light(only option currently) - Future:
dark(planned)
Left panel width (pixels) when window split between text & log.
- Default:
600 - Range:
300-1000 - Note: Right panel gets remaining space
How often (milliseconds) to check clipboard for new images.
- Default:
500(half second) - Lower (e.g., 200): More responsive, higher CPU
- Higher (e.g., 1000): Less responsive, lower CPU
- Recommended:
500
How many activity log lines to keep in memory.
- Default:
100 - Range:
50-500 - Note: Older entries still in
testbuddy_debug.log
Automatically copy extracted text to clipboard.
- Default:
False - Options:
True,False - When True: No need to click COPY TEXT button
Save all OCR results to history file.
- Default:
True - Options:
True,False - When False: History button disabled, no storage overhead
Maximum OCR sessions to keep in history.
- Default:
100 - Range:
10-1000 - Note: Oldest entries deleted when limit reached
Filename for history data.
- Default:
testbuddy_history.json - Format: JSON (human-readable)
- Location: Same directory as main.py
Default export file format.
- Default:
txt - Current Options:
txt - Future:
csv,json,pdf
Folder for exported sessions.
- Default:
exports - Example:
C:\Users\you\Documents\OCR Exports - Note: Auto-created if missing
Activity log filename.
- Default:
testbuddy_debug.log - Location: Same directory as main.py
- Format: Plain text, timestamped
Enable verbose logging (planned).
- Default:
False - Options:
True,False - Note: Currently logged regardless
[tesseract]
path = C:\Program Files\Tesseract-OCR\tesseract.exe
language = eng
psm = 6
oem = 3
[history]
enable_history = False[tesseract]
path = C:\Program Files\Tesseract-OCR\tesseract.exe
language = eng+fra+deu
psm = 6
oem = 3[behavior]
clipboard_poll_interval_ms = 1000
log_buffer_size = 50
[history]
enable_history = True
max_entries = 50[tesseract]
path = C:\Program Files\Tesseract-OCR\tesseract.exe
language = eng
psm = 6
oem = 3
[ui]
window_width = 1200
window_height = 800
window_always_on_top = False
[behavior]
auto_copy_on_ocr = True
[history]
enable_history = True
max_entries = 200
[export]
directory = C:\Users\you\Documents\OCR Exports
[logging]
debug_mode = True- Check INI file syntax (colons not equals signs)
- Verify section names in brackets
- Look for typos in option names
- Delete
testbuddy.iniand restart to regenerate
- Configuration is loaded on startup — Restart app
- Check
testbuddy_debug.logfor load errors - Verify you edited correct file (check path)
Error: invalid literal for int() with base 10: 'invalid'
Ensure numeric fields contain only numbers:
window_width = 900 ✓ Correct
window_width = "900" ✗ Wrong (remove quotes)
window_width = nine ✗ Wrong (use numbers)Boolean values must be capitalized:
enable_history = True ✓ Correct
enable_history = true ✗ Wrong (case-sensitive)
enable_history = 1 ✗ Wrong (use True/False)Access config in Python:
from config import ConfigManager
config_manager = ConfigManager()
config = config_manager.config
# Read
language = config.ocr_language
print(f"Using language: {language}")
# Modify
config.window_width = 1024
config.auto_copy_on_ocr = True
# Save
config_manager.save()- Delete
testbuddy.ini - Restart application
- New default config auto-generated
| Goal | Changes |
|---|---|
| Faster Screenshot Response | Decrease clipboard_poll_interval_ms |
| Lower Memory Use | Reduce log_buffer_size, disable history |
| Better OCR Accuracy | Adjust psm (try 3, 6, 11) |
| Support More Languages | Add codes to language field |
Last Updated: December 2025
Applies To: TestBuddy v1.0.0+