Metadata-Version: 2.4
Name: efootball-result-analyzer
Version: 0.1.0
Summary: OCR and optional Ollama-assisted eFootball result analyzer
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: opencv-python>=4.8
Requires-Dist: pillow>=10.0
Requires-Dist: pytesseract>=0.3.10

# eFootball Result Analyzer

Local eFootball screenshot analysis using OCR, with an optional Ollama vision fallback.

## Features

- OCR-first result extraction from eFootball screenshots
- Optional Ollama refinement pass for harder screenshots
- Importable Python API for reuse in other apps
- Desktop GUI uploader
- CLI entrypoint

## Install

```bash
pip install efootball-result-analyzer
```

You also need the native Tesseract executable installed on your machine.

## Python Usage

```python
from efootball_analyzer import OllamaSettings, analyze_match_result

result = analyze_match_result(
    "result.jpg",
    username="I clear ball",
    team="United",
    ollama=OllamaSettings(
        model="gemma3",
        base_url="http://127.0.0.1:11434",
        mode="fallback",
    ),
)

print(result["winner"], result["scoreline"])
```

## Ollama Cloud

For local Ollama, no API key is needed.

For Ollama Cloud, set an environment variable and point the base URL at Ollama:

```bash
export OLLAMA_API_KEY="your-key"
```

```python
from efootball_analyzer import OllamaSettings, analyze_match_result

result = analyze_match_result(
    "result.jpg",
    ollama=OllamaSettings(
        model="gemma3",
        base_url="https://ollama.com",
        mode="fallback",
        api_key=None,
    ),
)
```

When `api_key` is omitted, the CLI and GUI read `OLLAMA_API_KEY` from the environment.

## CLI

```bash
efootball-analyze --image result.jpg --use-ollama --ollama-model gemma3
efootball-analyze-gui
```
