import os import re blocks_dir = "src/blocks" blocks_with_eyebrow = [ "Affiliation", "Eligibility", "FAQTeaser", "FinalCTA", "ServicesList", "Stats", ] for block in blocks_with_eyebrow: component_path = os.path.join(blocks_dir, block, "Component.tsx") if os.path.exists(component_path): with open(component_path, "r") as f: content = f.read() # Replace `({ title,` with `({ eyebrow, title,` # Also need to handle cases where there is no space after { content = re.sub(r'\(\{\s*title', '({ eyebrow, title', content) with open(component_path, "w") as f: f.write(content) # Process block process = os.path.join(blocks_dir, "Process", "Component.tsx") with open(process, "r") as f: content = f.read() content = re.sub(r'\(\{\s*title', '({ eyebrow, subtitle, title', content) with open(process, "w") as f: f.write(content) # UniqueValue block uv = os.path.join(blocks_dir, "UniqueValue", "Component.tsx") with open(uv, "r") as f: content = f.read() content = re.sub(r'\(\{\s*title', '({ eyebrow, features, title', content) with open(uv, "w") as f: f.write(content) # ServicesDetailed block sd = os.path.join(blocks_dir, "ServicesDetailed", "Component.tsx") with open(sd, "r") as f: content = f.read() content = re.sub(r'\(\{\s*title', '({ eyebrow, title', content) with open(sd, "w") as f: f.write(content)