forked from kimhyungsik/ax_hub_mcp_tool
refactor: replace MapStruct INSTANCE with Spring DI in SmsLegacyConverter and ToolScaffolder template
This commit is contained in:
19
patch_htmls.py
Normal file
19
patch_htmls.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
base_dir = r"C:\Users\Admin\.gemini\antigravity\scratch\axhub-backend-main\axhub-gateway\src\main\resources\static"
|
||||
|
||||
files_to_patch = ["index.html", "playground.html"]
|
||||
for f in files_to_patch:
|
||||
path = os.path.join(base_dir, f)
|
||||
with open(path, "r", encoding="utf-8") as file:
|
||||
content = file.read()
|
||||
content = content.replace("tool.toolName", "tool.name")
|
||||
with open(path, "w", encoding="utf-8") as file:
|
||||
file.write(content)
|
||||
|
||||
catalog_path = os.path.join(base_dir, "catalog.html")
|
||||
with open(catalog_path, "r", encoding="utf-8") as file:
|
||||
catalog_content = file.read()
|
||||
catalog_content = catalog_content.replace("${tool.name}", "${tool.displayName} <span class=\"text-xs text-slate-500 font-mono\">(${tool.name})</span>")
|
||||
with open(catalog_path, "w", encoding="utf-8") as file:
|
||||
file.write(catalog_content)
|
||||
print("Done")
|
||||
Reference in New Issue
Block a user