INNER CODE UNIT · Python
replace_remote_logo
1186258278/OpenClawChineseTranslation · scripts/inject_remote.py:94
def replace_remote_logo(content):
"""替换远程 CDN 图片为本地 SVG"""
# 替换 img 标签
old_img = f'<img src="{REMOTE_LOGO_URL}" alt="OpenClaw" />'
if old_img in content:
content = content.replace(old_img, LOBSTER_SVG)
print(" ✅ 已替换远程 Logo 为本地 SVG")
return content
def main():
print("🦞 OpenClaw 功能面板远程注入")
print("=" * 50)
# 检查必需文件
check_required_files()
# 动态查找目标文件