20 lines
648 B
Python
20 lines
648 B
Python
#!/usr/bin/env python3
|
|
path = "/var/www/html/weval-technology-platform.html"
|
|
with open(path, "r", encoding="utf-8") as f:
|
|
content = f.read()
|
|
|
|
if "all-ia-hub" in content:
|
|
print("ALREADY")
|
|
exit(0)
|
|
|
|
old = '<a class="v80-quick" href="/wevia-em-big4.html"><span class="v80-quick-icon"></span>Big4 Model</a>'
|
|
new = old + '\n <a class="v80-quick" href="/all-ia-hub.html"><span class="v80-quick-icon"></span>All-IA Hub</a>'
|
|
|
|
if old in content:
|
|
content = content.replace(old, new, 1)
|
|
with open(path, "w", encoding="utf-8") as f:
|
|
f.write(content)
|
|
print(f"PATCHED size={len(content)}")
|
|
else:
|
|
print("MARKER NOT FOUND")
|