Files
boc/landvex-fix/remove_verticals_links.py
T
Bernt 6989a98d75 feat: Passwordless cross-device authentication
- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
2026-07-07 07:11:50 +00:00

44 lines
1.4 KiB
Python

#!/usr/bin/env python3
"""
Remove /verticals/ links from city pages and use-cases since it redirects to /.
"""
import os
import re
def remove_verticals_link(filepath):
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
content = f.read()
original = content
# Remove Verticals link from nav
content = re.sub(r'\s*<a href="/verticals/">Verticals</a>\s*\n?', '\n', content)
if content != original:
with open(filepath, 'w', encoding='utf-8') as f:
f.write(content)
return True
return False
def main():
base_dir = "/home/bernt/.openclaw/workspace/landvex-all"
count = 0
# Process cities and use-cases directories
for subdir in ['cities', 'use-cases']:
dir_path = os.path.join(base_dir, subdir)
if os.path.exists(dir_path):
for root, dirs, files in os.walk(dir_path):
for file in files:
if file.endswith('.html'):
filepath = os.path.join(root, file)
if remove_verticals_link(filepath):
count += 1
rel_path = os.path.relpath(filepath, base_dir)
print(f"Removed /verticals/ link: {rel_path}")
print(f"\nDone: Removed /verticals/ links from {count} files")
if __name__ == "__main__":
main()