Extract website to SREBOT-web repo: remove web/, move seasons/locales/constants to repo root, fix imports
This commit is contained in:
+2
-2
@@ -77,7 +77,7 @@ import BOT # noqa: F401, E402 — side effect: adds BOTS/SHARED to sys.path
|
||||
|
||||
from data_parser import apply_vehicle_name_filters # noqa: E402
|
||||
|
||||
LOCALES_DIR = Path(__file__).resolve().parent.parent / "web" / "locales"
|
||||
LOCALES_DIR = Path(__file__).resolve().parent.parent / "locales"
|
||||
DEFAULT_LANG = "en"
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ _STORAGE = Path(_storage_env)
|
||||
SQUADRONS_DB = _STORAGE / "squadrons.db"
|
||||
SQ_BATTLES_DB = _STORAGE / "sq_battles.db"
|
||||
SEASONS_TXT = (Path(__file__).resolve().parent.parent
|
||||
/ "web" / "constants" / "seasons")
|
||||
/ "constants" / "seasons")
|
||||
|
||||
_BR_LINE_RE = re.compile(r"<t:(\d+):\w+>.*?max BR\s+(\d+(?:\.\d+)?)",
|
||||
re.IGNORECASE)
|
||||
|
||||
+1
-1
@@ -1919,7 +1919,7 @@ async def guild_lang(guild_id: int) -> str:
|
||||
# SEASON SCHEDULE (shared with web/utils/seasons.js)
|
||||
# ============================================================================
|
||||
|
||||
SEASONS_FILE = Path(__file__).resolve().parent.parent / "web" / "constants" / "seasons"
|
||||
SEASONS_FILE = Path(__file__).resolve().parent.parent / "constants" / "seasons"
|
||||
|
||||
_SEASON_HEADER_RE = re.compile(r"^\s*(\d{4})-(I{1,3}|IV|VI{0,3}|IX|X)\s*$")
|
||||
_WEEK_LINE_RE = re.compile(
|
||||
|
||||
Reference in New Issue
Block a user