INNER CODE UNIT · Python

find_main_css

1186258278/OpenClawChineseTranslation · scripts/inject_remote.py:51

def find_main_css():
    """动态查找主 CSS 文件"""
    css_files = glob.glob(os.path.join(ASSETS_DIR, "index-*.css"))
    
    if not css_files:
        print("❌ 找不到主 CSS 文件 (index-*.css)")
        sys.exit(1)
    
    # 选择最大的
    return max(css_files, key=os.path.getsize)


def check_required_files():
    """检查必需的文件是否存在"""
    required = [
        (PANEL_JS_PATH, "feature-panel.js"),
        (PANEL_CSS_PATH, "feature-panel.css"),
        (PANEL_DATA_PATH, "panel-data.json"),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…