#!/usr/bin/env python3 """ Portfolio patcher — apply two changes: 1. Email: anishdesigns3@gmail.com → anishstudio25@gmail.com 2. Hero role: "Graphic Designer — Pokhara, Nepal" → "Graphic Designer | AI-Driven Workflow / Pokhara, Nepal" + smaller font-size in CSS Usage: python3 patch_portfolio.py your_portfolio.html output.html """ import sys import os def patch(src: str) -> str: # ── 1. Email (appears twice: contact section + footer) ────────────── src = src.replace('anishdesigns3@gmail.com', 'anishstudio25@gmail.com') # ── 2. Hero role text ──────────────────────────────────────────────── old_role = '
Graphic Designer — Pokhara, Nepal
' new_role = ( '
' 'Graphic Designer  |  AI-Driven Workflow' '
' 'Pokhara, Nepal' '
' ) src = src.replace(old_role, new_role) # ── 3. Hero-role CSS — reduce clamp so the line doesn't look huge ──── old_css = ( 'font-size:clamp(1.1rem,2.5vw,2rem);' 'color:var(--mu);letter-spacing:-0.01em;' 'margin-top:0.8rem;opacity:0;' 'animation:fadeUp 0.9s 0.5s cubic-bezier(0.22,1,0.36,1) forwards;}' ) new_css = ( 'font-size:clamp(0.88rem,1.8vw,1.35rem);' 'color:var(--mu);letter-spacing:-0.01em;' 'margin-top:0.8rem;line-height:1.55;opacity:0;' 'animation:fadeUp 0.9s 0.5s cubic-bezier(0.22,1,0.36,1) forwards;}' ) src = src.replace(old_css, new_css) return src def main(): if len(sys.argv) < 3: print("Usage: python3 patch_portfolio.py input.html output.html") sys.exit(1) input_path = sys.argv[1] output_path = sys.argv[2] if not os.path.exists(input_path): print(f"Error: file not found — {input_path}") sys.exit(1) with open(input_path, encoding='utf-8') as f: html = f.read() patched = patch(html) # Verify patches applied checks = [ ('anishstudio25@gmail.com', 'Email updated'), ('AI-Driven Workflow', 'Hero role updated'), ('1.8vw,1.35rem', 'CSS font-size reduced'), ] for needle, label in checks: found = needle in patched status = '✓' if found else '✗ NOT FOUND' print(f" {status} {label}") with open(output_path, 'w', encoding='utf-8') as f: f.write(patched) print(f"\nSaved → {output_path}") if __name__ == '__main__': main()