Files
weval-l99/v98_add_links.py
2026-04-24 04:38:58 +02:00

29 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""V98 - Add missing pages to WTP (with emoji bytes)"""
path = "/var/www/html/weval-technology-platform.html"
with open(path, "rb") as f:
raw = f.read()
if b"/wevia-em-big4.html" in raw:
print("ALREADY")
exit(0)
# Full line with emoji bytes for Ethica (⚕️ = e2 9a 95 ef b8 8f)
marker = b' <a class="v80-quick" href="/ethica-hub.html"><span class="v80-quick-icon">\xe2\x9a\x95\xef\xb8\x8f</span>Ethica</a>\n'
if marker not in raw:
print("MARKER NOT FOUND")
# Show nearest
idx = raw.find(b'ethica-hub')
if idx >= 0:
print(f"Found 'ethica-hub' at {idx}, context: {raw[idx-50:idx+50]!r}")
exit(1)
# Add 2 new links after Ethica (with their own icons)
addition = marker + b' <a class="v80-quick" href="/wevia-em-big4.html"><span class="v80-quick-icon">\xf0\x9f\x8f\xa2</span>Big4 Model</a>\n <a class="v80-quick" href="/value-streaming.html"><span class="v80-quick-icon">\xe2\x9a\xa1</span>Value Stream</a>\n'
raw = raw.replace(marker, addition, 1)
with open(path, "wb") as f:
f.write(raw)
print(f"PATCHED size: {len(raw)}")