Files
vosonandCursor 4a61aeeb26 Add PC post-match player pages with opt-in public OSS sync.
Generate /players/{account_id}[/{match_id}] locally after POST_GAME via OpenDota; publish to OSS only when public_share is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 11:01:32 +08:00

57 lines
2.6 KiB
Python

"""Repository-wide path constants; the single source of truth for locations.
No third-party imports so both subprojects (and CI) can use this without
opencv/numpy. Layout:
climperor/
├── pc/ # in-game draft recognition (GSI + screenshot + overlay)
├── web/ # Climperor web site (frontend, pipelines, deploy)
└── shared/ # this package + shared hero/relations data
"""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SHARED_DIR = Path(__file__).resolve().parent
SHARED_DATA = SHARED_DIR / "data"
HEROES_JSON = SHARED_DATA / "heroes.json"
RELATIONS_JSON = SHARED_DATA / "relations.json"
# PC subproject locations (referenced by shared/pc scripts; code lives in pc/).
PC_DIR = ROOT / "pc"
PC_CONFIG = PC_DIR / "config.json"
TEMPLATES_CDN = PC_DIR / "templates" / "cdn"
# Post-match player pages (profile + match JSON; gitignored; local/OSS).
PC_PLAYER_PAGES = PC_DIR / "player_pages"
# Web subproject locations. DATA keeps its historical name: every web-side
# JSON cache lives here (hero_stats, patches, streamers, ...).
WEB_ROOT = ROOT / "web"
WEB_FRONTEND = WEB_ROOT / "frontend"
DATA = WEB_ROOT / "data"
WEB_DIST = WEB_ROOT / "dist"
WEB_ASSETS = WEB_ROOT / "assets"
# Landscape cards from dota2.com/heroes (Steam CDN heroes/{key}.png); UI only.
HERO_PORTRAITS = WEB_ASSETS / "hero_portraits"
# Primary-attribute icons from dota2.com (dota_react/icons/hero_*.png); UI only.
ATTR_ICONS = WEB_ASSETS / "attr_icons"
# Valve hero-selection role filter icons, chroma keyed to transparent PNGs.
ROLE_ICONS = WEB_ASSETS / "role_icons"
# Item icons from Steam CDN (dota_react/items/{key}.png); Web + PC draft overlay.
ITEM_ICONS = WEB_ASSETS / "item_icons"
# Shop category header icons from dota2.com.cn/items/images/itemcat_*.png.
ITEM_CAT_ICONS = WEB_ASSETS / "item_cat_icons"
# Ability icons from Steam CDN (dota_react/abilities/{key}.png); Climperor web site only.
ABILITY_ICONS = WEB_ASSETS / "ability_icons"
# Generic UI glyphs from dota2.com.cn (herostatic/icons/*.png); Climperor web site only.
UI_ICONS = WEB_ASSETS / "ui_icons"
# Rank medal icons (OpenDota rank_icon_1..8); Climperor web trends tab only.
RANK_ICONS = WEB_ASSETS / "rank_icons"
# Streamer avatars cached by fetch_streamers.py; Climperor web「主播」only.
STREAMER_AVATARS = WEB_ASSETS / "streamer_avatars"
# Curated Douyin highlight clips for streamer cards; Climperor web「主播」only.
STREAMER_VIDEOS = WEB_ASSETS / "streamer_videos"
# Official ability demo clips from dota2.com (dota_react/abilities/{hero}/{ability}.webm).
ABILITY_VIDEOS = WEB_ASSETS / "ability_videos"