',
1,
)
# Close shell/main/layout before scripts when page has JS block.
marker = '\n\n
#!/usr/bin/env python3 from pathlib import Path import sys app_path = Path(sys.argv[1]) if len(sys.argv) > 1 else Path('/opt/virtuality/web/app.py') templates_dir = app_path.parent / 'templates' if not templates_dir.exists(): raise SystemExit(f'templates dir not found: {templates_dir}') skip = {'login.html', 'console.html', '_sidebar.html'} changed = [] skipped = [] for path in sorted(templates_dir.glob('*.html')): if path.name in skip: skipped.append(f'{path.name}: skipped system/template') continue text = path.read_text() if '{% include "_sidebar.html" %}' in text or "{% include '_sidebar.html' %}" in text: skipped.append(f'{path.name}: already has sidebar') continue if '