email trust signals: add data-safety + guarantee + social-proof strip to HC, telecom (campaign_template), and trucking (6 source + active campaigns via injector). Vertical accents: teal/blue/orange
This commit is contained in:
parent
95698852ce
commit
53ec011198
8 changed files with 196 additions and 10 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!-- Header -->
|
||||
<tr><td style="background-color:#0f766e;background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);padding:26px 28px;">
|
||||
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<img src="https://performancewest.net/images/logo-white.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<h1 style="color:#fff;margin:0;font-size:22px;font-weight:700;font-family:Inter,system-ui,sans-serif;">Provider Compliance Review</h1>
|
||||
<p style="color:#ccfbf1;margin:6px 0 0;font-size:13px;font-family:Inter,system-ui,sans-serif;">Annual compliance, done for you</p>
|
||||
</td></tr>
|
||||
|
|
@ -38,12 +38,28 @@
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>(888) 411-0383</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;">
|
||||
<p style="margin:0;">Performance West Inc. · Cheyenne, WY · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
||||
<p style="margin:6px 0 0;">You received this because your provider record is publicly listed in the CMS NPPES registry.</p>
|
||||
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!-- Header -->
|
||||
<tr><td style="background-color:#0f766e;background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);padding:26px 28px;">
|
||||
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<img src="https://performancewest.net/images/logo-white.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<h1 style="color:#fff;margin:0;font-size:22px;font-weight:700;font-family:Inter,system-ui,sans-serif;">Provider Enrollment Alert</h1>
|
||||
<p style="color:#ccfbf1;margin:6px 0 0;font-size:13px;font-family:Inter,system-ui,sans-serif;">Deactivated enrollment detected</p>
|
||||
</td></tr>
|
||||
|
|
@ -38,12 +38,28 @@
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>(888) 411-0383</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;">
|
||||
<p style="margin:0;">Performance West Inc. · Cheyenne, WY · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
||||
<p style="margin:6px 0 0;">You received this because your provider record is publicly listed in the CMS NPPES registry.</p>
|
||||
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!-- Header -->
|
||||
<tr><td style="background-color:#0f766e;background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);padding:26px 28px;">
|
||||
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<img src="https://performancewest.net/images/logo-white.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<h1 style="color:#fff;margin:0;font-size:22px;font-weight:700;font-family:Inter,system-ui,sans-serif;">NPPES Data Alert</h1>
|
||||
<p style="color:#ccfbf1;margin:6px 0 0;font-size:13px;font-family:Inter,system-ui,sans-serif;">Outdated registry information detected</p>
|
||||
</td></tr>
|
||||
|
|
@ -38,12 +38,28 @@
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>(888) 411-0383</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;">
|
||||
<p style="margin:0;">Performance West Inc. · Cheyenne, WY · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
||||
<p style="margin:6px 0 0;">You received this because your provider record is publicly listed in the CMS NPPES registry.</p>
|
||||
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!-- Header -->
|
||||
<tr><td style="background-color:#0f766e;background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);padding:26px 28px;">
|
||||
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<img src="https://performancewest.net/images/logo-white.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<h1 style="color:#fff;margin:0;font-size:22px;font-weight:700;font-family:Inter,system-ui,sans-serif;">Exclusion Screening Notice</h1>
|
||||
<p style="color:#ccfbf1;margin:6px 0 0;font-size:13px;font-family:Inter,system-ui,sans-serif;">Annual OIG/SAM screening requirement</p>
|
||||
</td></tr>
|
||||
|
|
@ -38,12 +38,28 @@
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>(888) 411-0383</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;">
|
||||
<p style="margin:0;">Performance West Inc. · Cheyenne, WY · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
||||
<p style="margin:6px 0 0;">You received this because your provider record is publicly listed in the CMS NPPES registry.</p>
|
||||
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!-- Header -->
|
||||
<tr><td style="background-color:#0f766e;background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);padding:26px 28px;">
|
||||
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<img src="https://performancewest.net/images/logo-white.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
||||
<h1 style="color:#fff;margin:0;font-size:22px;font-weight:700;font-family:Inter,system-ui,sans-serif;">Medicare Revalidation Alert</h1>
|
||||
<p style="color:#ccfbf1;margin:6px 0 0;font-size:13px;font-family:Inter,system-ui,sans-serif;">Your CMS revalidation deadline has passed</p>
|
||||
</td></tr>
|
||||
|
|
@ -38,12 +38,28 @@
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>(888) 411-0383</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;">
|
||||
<p style="margin:0;">Performance West Inc. · Cheyenne, WY · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
||||
<p style="margin:6px 0 0;">You received this because your provider record is publicly listed in the CMS NPPES registry.</p>
|
||||
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
||||
</td></tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,23 @@ def render(seg_key: str, *, test: bool = False) -> tuple[str, str]:
|
|||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0;"><tr><td style="background:#f0f4f8;border-radius:8px;padding:16px;font-size:13px;color:#374151;line-height:1.6;">
|
||||
<strong>Questions?</strong> Reply to this email or call <strong>{PHONE}</strong>. Performance West is a dedicated healthcare compliance firm — we handle the CMS/NPPES paperwork so you can focus on patients.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- Trust signals (data-safety + guarantee — relevant when sharing NPI/PECOS info) -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr>
|
||||
<td align="center" style="padding:10px 4px;font-family:Inter,system-ui,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">✅ HIPAA & PCI compliant</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 8px;font-size:11px;font-weight:600;color:#0f766e;">💳 Secure payment by Stripe</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding:4px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#4b5563;">
|
||||
<strong style="color:#047857;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by providers nationwide
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
|
|
|
|||
|
|
@ -55,6 +55,19 @@
|
|||
<strong>Need help?</strong> Reply to this email or call us at <strong>(888) 411-0383</strong>. We offer a <strong>free compliance assessment</strong> for all FCC-registered carriers.
|
||||
</td></tr></table>
|
||||
|
||||
<!-- pw-trust-strip-v1 : data-safety + guarantee + social proof -->
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:18px 0 4px;border-top:1px solid #e5e7eb;padding-top:14px;">
|
||||
<tr><td align="center" style="padding:8px 4px;font-family:Inter,sans-serif;">
|
||||
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">🛡️ SOC 2 Type II hosting</span>
|
||||
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">🔒 256-bit TLS encrypted</span>
|
||||
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">💳 Secure payment by Stripe</span>
|
||||
<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#1d4ed8;">✅ SSL Labs A+ rated</span>
|
||||
</td></tr>
|
||||
<tr><td align="center" style="padding:2px 4px 8px;font-family:Inter,sans-serif;font-size:12px;color:#475569;">
|
||||
<strong style="color:#1d4ed8;">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by carriers nationwide
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</td></tr>
|
||||
|
||||
<!-- Footer -->
|
||||
|
|
|
|||
76
scripts/email/inject_trust_trucking.py
Normal file
76
scripts/email/inject_trust_trucking.py
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Inject a trucking-appropriate trust strip into the trucking source-template
|
||||
campaigns in the trucking Listmonk DB (the ones the nightly builder clones).
|
||||
Idempotent: skips campaigns that already have the strip. Run on the host.
|
||||
"""
|
||||
import subprocess, sys
|
||||
|
||||
SOURCE_IDS = [271, 272, 273, 274, 309, 310]
|
||||
MARKER = "pw-trust-strip-v1"
|
||||
|
||||
# Trucking trust strip — data-safety + guarantee + social proof. Matches site.
|
||||
STRIP = (
|
||||
'<!-- ' + MARKER + ' -->'
|
||||
'<table role="presentation" width="100%" cellpadding="0" cellspacing="0" '
|
||||
'style="margin:18px 0 6px;border-top:1px solid #e5e7eb;padding-top:14px">'
|
||||
'<tr><td align="center" style="padding:8px 4px;font-family:Inter,system-ui,sans-serif">'
|
||||
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">🛡️ SOC 2 Type II hosting</span>'
|
||||
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">🔒 256-bit TLS encrypted</span>'
|
||||
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">💳 Secure payment by Stripe</span>'
|
||||
'<span style="display:inline-block;margin:0 7px;font-size:11px;font-weight:600;color:#c2410c">✅ SSL Labs A+ rated</span>'
|
||||
'</td></tr>'
|
||||
'<tr><td align="center" style="padding:2px 4px 8px;font-family:Inter,system-ui,sans-serif;font-size:12px;color:#475569">'
|
||||
'<strong style="color:#c2410c">100% satisfaction guarantee</strong> · fixed pricing, no billable hours · trusted by thousands of carriers nationwide'
|
||||
'</td></tr></table>'
|
||||
)
|
||||
|
||||
|
||||
def psql(sql, fetch=False):
|
||||
cmd = ["docker", "exec", "-i", "performancewest-api-postgres-1",
|
||||
"psql", "-U", "pw", "-d", "listmonk", "-tAc", sql]
|
||||
r = subprocess.run(["sudo"] + cmd, capture_output=True, text=True)
|
||||
if r.returncode != 0:
|
||||
print("PSQL ERR:", r.stderr[:200]); sys.exit(1)
|
||||
return r.stdout.strip()
|
||||
|
||||
|
||||
def set_body(cid, body):
|
||||
# write body via a file to avoid shell-escaping a huge HTML blob
|
||||
import tempfile, os
|
||||
with tempfile.NamedTemporaryFile("w", suffix=".sql", delete=False) as f:
|
||||
# use dollar-quoting
|
||||
f.write(f"UPDATE campaigns SET body = $PWBODY${body}$PWBODY$ WHERE id = {cid};")
|
||||
path = f.name
|
||||
subprocess.run(["sudo", "docker", "cp", path, "performancewest-api-postgres-1:/tmp/u.sql"], check=True)
|
||||
r = subprocess.run(["sudo", "docker", "exec", "performancewest-api-postgres-1",
|
||||
"psql", "-U", "pw", "-d", "listmonk", "-f", "/tmp/u.sql"],
|
||||
capture_output=True, text=True)
|
||||
os.unlink(path)
|
||||
return "UPDATE 1" in r.stdout
|
||||
|
||||
|
||||
def main():
|
||||
for cid in SOURCE_IDS:
|
||||
body = psql(f"select body from campaigns where id={cid};")
|
||||
if not body:
|
||||
print(f" {cid}: NOT FOUND, skip"); continue
|
||||
if MARKER in body:
|
||||
print(f" {cid}: already has trust strip, skip"); continue
|
||||
# Inject right before the final footer block. Anchor: the
|
||||
# '<div style="text-align:center;padding:16px;font-size:11px' footer line,
|
||||
# else before the last </div></div> close.
|
||||
anchor = '<div style="text-align:center;padding:16px;font-size:11px'
|
||||
if anchor in body:
|
||||
new = body.replace(anchor, STRIP + anchor, 1)
|
||||
else:
|
||||
# fallback: before the very last </div>
|
||||
idx = body.rfind("</div>")
|
||||
new = body[:idx] + STRIP + body[idx:] if idx != -1 else body + STRIP
|
||||
if set_body(cid, new):
|
||||
print(f" {cid}: trust strip injected")
|
||||
else:
|
||||
print(f" {cid}: UPDATE failed")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue