24 lines
866 B
Python
24 lines
866 B
Python
#!/usr/bin/env python3
|
|
"""V112 - Add wevia-orchestrator link to WTP near all-ia-hub (doctrine 14 additif)"""
|
|
path = "/var/www/html/weval-technology-platform.html"
|
|
with open(path, "rb") as f:
|
|
raw = f.read()
|
|
|
|
if b"wevia-orchestrator.html" in raw:
|
|
print("ALREADY HAS orch link")
|
|
exit(0)
|
|
|
|
# Find all-ia-hub anchor (V107)
|
|
marker = b'<a class="v80-quick" href="/all-ia-hub.html"><span class="v80-quick-icon">\xf0\x9f\xa7\xa0</span>All-IA Hub</a>'
|
|
if marker not in raw:
|
|
print("ALL-IA-HUB marker not found")
|
|
exit(1)
|
|
|
|
# Add Orchestrator right after All-IA Hub (emoji: 🎯 = \xf0\x9f\x8e\xaf)
|
|
new = marker + b'\n <a class="v80-quick" href="/wevia-orchestrator.html"><span class="v80-quick-icon">\xf0\x9f\x8e\xaf</span>Orchestrator</a>'
|
|
raw = raw.replace(marker, new, 1)
|
|
|
|
with open(path, "wb") as f:
|
|
f.write(raw)
|
|
print(f"PATCHED size={len(raw)}")
|