Drop real template library; keep CDN-only matching.

Remove build_library and runtime artifacts, ignore regenerable outputs, and add README/AGENTS/DESIGN/CHANGELOG for the simplified project.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-26 11:59:48 +08:00
co-authored by Cursor
parent f32d24b8f8
commit a089660ca9
69 changed files with 299 additions and 5050 deletions
+9 -17
View File
@@ -8,7 +8,6 @@ import numpy as np
ROOT = Path(__file__).parent
CONFIG_PATH = ROOT / "config.json"
TEMPLATES_REAL = ROOT / "templates" / "real"
TEMPLATES_CDN = ROOT / "templates" / "cdn"
@@ -123,20 +122,13 @@ def has_ranked_overlay(img: np.ndarray, cfg: dict) -> bool:
return checked > 0 and hits >= max(6, checked * 0.6)
def load_template_library() -> list[tuple[str, str, np.ndarray]]:
"""Return list of (hero_key, source, image). source is 'real' or 'cdn'."""
lib: list[tuple[str, str, np.ndarray]] = []
if TEMPLATES_REAL.is_dir():
for hero_dir in sorted(TEMPLATES_REAL.iterdir()):
if not hero_dir.is_dir():
continue
for png in hero_dir.glob("*.png"):
img = cv2.imread(str(png))
if img is not None:
lib.append((hero_dir.name, "real", img))
if TEMPLATES_CDN.is_dir():
for png in TEMPLATES_CDN.glob("*.png"):
img = cv2.imread(str(png))
if img is not None:
lib.append((png.stem, "cdn", img))
def load_template_library() -> list[tuple[str, np.ndarray]]:
"""Return list of (hero_key, image) from Steam CDN portraits."""
lib: list[tuple[str, np.ndarray]] = []
if not TEMPLATES_CDN.is_dir():
return lib
for png in sorted(TEMPLATES_CDN.glob("*.png")):
img = cv2.imread(str(png))
if img is not None:
lib.append((png.stem, img))
return lib