Reorganize repository into pc web shared monorepo
Separate the local recognition, web publishing, and shared data paths while preserving direct script execution and existing site content. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
"""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"
|
||||
|
||||
# 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"
|
||||
# Item icons from Steam CDN (dota_react/items/{key}.png); Climperor web site only.
|
||||
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"
|
||||
Reference in New Issue
Block a user