Polish project documentation and runtime config

This commit is contained in:
2026-06-09 10:22:59 +08:00
parent 5f061295d8
commit 0594fc9f8c
43 changed files with 1001 additions and 97 deletions

17
scripts/common_paths.py Normal file
View File

@@ -0,0 +1,17 @@
from __future__ import annotations
import os
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
DATA_ROOT = Path(os.getenv("TRAVEL_KG_DATA_ROOT", PROJECT_ROOT / "data")).expanduser()
TRAVEL_AGENCY_SOURCE_ROOT = Path(
os.getenv("TRAVEL_AGENCY_SOURCE_ROOT", DATA_ROOT / "source" / "travel_agency")
).expanduser()
TRAVEL_DELIVERY_ROOT = Path(
os.getenv("TRAVEL_DELIVERY_ROOT", DATA_ROOT / "source" / "travel_delivery_20260602")
).expanduser()
TRAVEL_KG_EXPORT_ROOT = Path(os.getenv("TRAVEL_KG_EXPORT_ROOT", DATA_ROOT / "exports")).expanduser()
GAODE_CRAWLER_PATH = Path(os.getenv("GAODE_CRAWLER_PATH", PROJECT_ROOT / "scripts" / "crawl_guiyan.py")).expanduser()
ENV_PATH = Path(os.getenv("TRAVEL_KG_ENV_PATH", PROJECT_ROOT / ".env")).expanduser()