#!/usr/bin/env python3 """모프로의원 AI 공식답변허브페이지 빌드 폴더 후처리. 공유 템플릿(templates/supporters-astro)의 화면 문구에는 '서포터즈'가 들어 있다. haewon 결정(2026-10-08)으로 템플릿은 그대로 두고 이 병원 빌드에서만 문구를 바꾼다. 워커(run.mjs)는 build 단계마다 템플릿 코드를 다시 덮으므로 워커를 돌린 뒤 매번 이 스크립트를 실행하고 다시 빌드한다. python3 supporters/briefs/mopro/patch_site.py [~/supporters-builds/mopro/site] 하는 일 1. 화면 문구의 '서포터즈'·'Supporters'를 '공식 답변 안내'·'편집팀'·'Official Answer Guide'로 바꾼다 2. 회복 일정 캘린더 파일 정보(PRODID·UID)에 남은 다른 병원 이름을 INFINITH·모프로로 바꾼다 3. clinic.json excludeImages 에 해당하는 파일을 public/img 전체에서 지운다(워커는 img/clinic 만 지운다) 4. vercel.json 사이트 주소를 정식 주소로 넣고, 공유 이미지(og.jpg)를 '서포터즈' 없는 상단 문구로 다시 그린다 5. src 에 화면용 '서포터즈'가 남아 있으면 실패로 끝낸다 """ import json import os import re import subprocess import sys HERE = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.abspath(os.path.join(HERE, "..", "..", "..")) SITE = os.path.expanduser(sys.argv[1] if len(sys.argv) > 1 else "~/supporters-builds/mopro/site") SITE_URL = "https://mopro.webforai.kr" # haewon 지시 2026-10-12 OG_EYEBROW = "OFFICIAL ANSWER GUIDE" # (파일, 바꿀 문구, 새 문구). 이미 바뀐 파일에 다시 돌려도 되도록 원문이 없으면 건너뛴다 REPLACEMENTS = [ ("src/lib.ts", "서포터즈`;", "공식 답변 안내`;"), ("src/lib.ts", "질문에 먼저 답하는 서포터즈 매체", "질문에 먼저 답하는 공식 답변 안내"), ("src/components/ReviewBox.astro", "서포터즈는 의학적 판단을 하지 않습니다.", "이 안내 페이지는 의학적 판단을 하지 않습니다."), ("src/components/Video.astro", "영상 발화를 서포터즈가 글로 재구성한", "영상 발화를 편집팀이 글로 재구성한"), ("src/lib/i18n.ts", "brand: '서포터즈',", "brand: '공식 답변 안내',"), ("src/lib/i18n.ts", "이 매체는 {clinic}의 지원을 받아 서포터즈가 운영합니다.", "이 안내 페이지는 {clinic}의 지원을 받아 INFINITH 편집팀이 운영합니다."), ("src/lib/i18n.ts", "brand: 'Supporters',", "brand: 'Official Answer Guide',"), ("src/lib/i18n.ts", "This site is run by supporters with support from {clinic}.", "This guide is run by the INFINITH editorial team with support from {clinic}."), ("src/lib/plan.ts", "@view-supporters", "@mopro-answer-guide"), ("src/lib/plan.ts", "-//View Supporters//Recovery Planner//KO", "-//INFINITH//Recovery Planner//KO"), ("src/layouts/Base.astro", "`${nameEn} Supporters`", "`${nameEn} Official Answer Guide`"), ("src/data/authors.json", "\"서포터즈 편집 책임\"", "\"편집 책임\""), ("src/pages/videos.astro", "영상마다 서포터즈가 답을", "영상마다 편집팀이 답을"), ("src/pages/videos.astro", "짧은 영상에는 서포터즈가 답을", "짧은 영상에는 편집팀이 답을"), ("src/pages/videos.astro", "서포터즈가 답을 글로도 정리했습니다", "편집팀이 답을 글로도 정리했습니다"), ("src/pages/videos.astro", ">서포터즈 답<", ">정리한 답<"), ("src/pages/en/index.astro", "'Supporters (English)'", "'Official Answer Guide (English)'"), ("src/pages/en/index.astro", "This site is run by supporters who answer", "This site is run by an editorial team that answers"), ("src/pages/editorial.astro", "병원 담당자, 서포터즈, INFINITH 운영진이", "병원 담당자, 편집팀, INFINITH 운영진이"), ("src/pages/editorial.astro", "