19 lines
1.6 KiB
Python
19 lines
1.6 KiB
Python
import re
|
|
|
|
# Read the modified file
|
|
with open('app/services/repairs/page.tsx', 'r') as f:
|
|
content = f.read()
|
|
|
|
# Modify Hero section to add links
|
|
hero_pattern = r'<p className="text-lg text-muted-foreground max-w-3xl mx-auto leading-relaxed mb-8">\s*Rocky Mountain Vending delivers expert vending machine repair and maintenance services to keep your business thriving\. From resolving jammed coin slots and refrigeration issues to fixing non-dispensing machines, our skilled technicians ensure reliable performance\. Contact us today for fast, professional solutions!\s*</p>'
|
|
hero_replacement = '''<p className="text-lg text-muted-foreground max-w-3xl mx-auto leading-relaxed mb-8">
|
|
Rocky Mountain Vending delivers expert <Link href="/services/repairs" className="text-primary hover:underline font-semibold">vending machine repair</Link> and maintenance services to keep your business thriving. From resolving jammed coin slots and refrigeration issues to fixing non-dispensing machines, our skilled technicians ensure reliable performance. For all your <Link href="/services/parts" className="text-primary hover:underline">vending machine parts</Link> needs and professional <Link href="/services/moving" className="text-primary hover:underline">vending machine moving</Link> services, contact us today for fast, professional solutions!
|
|
</p>'''
|
|
|
|
content = re.sub(hero_pattern, hero_replacement, content, flags=re.MULTILINE | re.DOTALL)
|
|
|
|
# Write the modified content
|
|
with open('app/services/repairs/page.tsx', 'w') as f:
|
|
f.write(content)
|
|
|
|
print("✅ Successfully updated Hero section with internal links!")
|