#!/usr/bin/env python3 """ Script to analyze blade files and identify which need w-full wrapper modification """ import os import re from pathlib import Path def analyze_file(filepath): """Analyze a single blade file to determine if it needs modification""" try: with open(filepath, 'r', encoding='utf-8') as f: content = f.read() except Exception as e: return {'status': 'error', 'reason': str(e)} # Check for modal layouts (exclude these) if '' in content or '' in content: return {'status': 'excluded', 'reason': 'modal layout'} # Check if file has if '' not in content: return {'status': 'excluded', 'reason': 'no header slot'} # Extract the header slot content header_match = re.search(r'(.*?)', content, re.DOTALL) if not header_match: return {'status': 'excluded', 'reason': 'no header slot found'} header_content = header_match.group(1) # Check if it has breadcrumbs if ']*>.*?