39292-vm/fix_home_2.py
2026-03-12 20:38:42 +00:00

50 lines
2.5 KiB
Python

import re
with open('tmp_home_current2.html', 'r', encoding='utf-8') as f:
html = f.read()
old_cred = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"16px"},"color":{"text":"#ffffff"}},"textColor":"white"} -->
<p class="has-white-color has-text-color" style="font-size:16px;color:#ffffff"><strong>Credentials</strong></p>
<!-- /wp:paragraph -->
<!-- wp:list -->
<ul><li>ICF PCC Certified Executive and Life Coach</li><li>Trained in Adaptive Leadership Styles and Personal and Professional Transformations</li></ul>
<!-- /wp:list -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#94a3b8"}}} -->
<p style="color:#94a3b8;font-size:14px">Confidential. Insightful. Practical.</p>
<!-- /wp:paragraph -->"""
new_cred = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"},"color":{"text":"#ffffff"}},"textColor":"white"} -->
<p class="has-white-color has-text-color" style="font-size:18px;color:#ffffff"><strong>Credentials</strong></p>
<!-- /wp:paragraph -->
<!-- wp:list {"style":{"typography":{"fontSize":"18px"}}} -->
<ul style="font-size:18px"><li>ICF PCC Certified Executive and Life Coach</li><li>Trained in Adaptive Leadership Styles and Personal and Professional Transformations</li></ul>
<!-- /wp:list -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"},"color":{"text":"#94a3b8"}}} -->
<p style="color:#94a3b8;font-size:18px">Confidential. Insightful. Practical.</p>
<!-- /wp:paragraph -->"""
if old_cred in html:
html = html.replace(old_cred, new_cred)
else:
print("Warning: could not find old_cred without newlines")
old_p2 = """<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"20px"}}} -->
<h3 style="font-size:20px">Coaching</h3>
<!-- /wp:heading -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","fontWeight":"700"}}} -->
<p style="font-size:24px;font-weight:700">$550 <span style="font-size:16px;font-weight:400">/ hour</span></p>"""
new_p2 = """<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"20px"}}} -->
<h3 style="font-size:20px;min-height:60px">Coaching</h3>
<!-- /wp:heading -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","fontWeight":"700"}}} -->
<p style="font-size:24px;font-weight:700">$500 <span style="font-size:16px;font-weight:400">/ hour</span></p>"""
if old_p2 in html:
html = html.replace(old_p2, new_p2)
else:
print("Warning: could not find old_p2 without newlines")
with open('tmp_home_current3.html', 'w', encoding='utf-8') as f:
f.write(html)