#!/usr/bin/env python3
"""Add Equidia prediction"""
import sqlite3
from datetime import datetime

DB_PATH = "/home/h3r7/turf_scraper/turf.db"
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()

# Add Equidia prediction for today
# From email: "I'M A BELIEVER (7) peut mettre tout le monde d'accord"
# Let's add the top 3 from Equidia analysis

today = "2026-02-24"
race = "Quinte Cagnes-sur-Mer"

# Based on the email, we know I'M A BELIEVER is the favorite
# This is a placeholder - we'd need to parse the full email for complete picks
equidia_picks = [
    (today, "equidia", race, "I'M A BELIEVER", 0, 1, 80),  # 80% confidence
]

for date, source, race_name, horse, odds, rank, conf in equidia_picks:
    c.execute("""
        INSERT INTO external_predictions 
        (date, source, race_name, horse_name, odds, rank, confidence)
        VALUES (?, ?, ?, ?, ?, ?, ?)
    """, (date, source, race_name, horse, odds, rank, conf))

conn.commit()
print("Equidia prediction added!")

# Verify
c.execute("SELECT * FROM external_predictions WHERE source = 'equidia'")
for row in c.fetchall():
    print(row)

conn.close()
