Files
Pier_v1/Code/교각모델링앱/tools/patches/s02_mockup_patch.py
T
ahnyongjooandClaude Sonnet 5.5 964a841de1 chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환
- Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용
- pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관)
- worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md)
- D:\Rhino-MCP 경로 참조를 새 위치로 치환

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 11:20:18 +09:00

24 lines
1.6 KiB
Python

"""Insert the S02 view (s02_mockup_view.js) into the design mockup DOC/01_기획/웹앱디자인시안/시안/index.html (2026-10-15).
The original is copied to ../backup first by the caller; the patch is applied once (refuses if already applied)."""
from pathlib import Path
HERE = Path(__file__).parent
P = Path(__file__).resolve().parents[4] / "DOC" / "01_기획" / "웹앱디자인시안" / "시안" / "index.html"
s = P.read_text(encoding="utf-8")
assert "viewNew" not in s, "already applied"
js = (HERE / "s02_mockup_view.js").read_text(encoding="utf-8")
pairs = [
(" /* ---------- router ---------- */", js + "\n /* ---------- router ---------- */"),
(" else if (h.indexOf('#/candidates') === 0) viewCandidates();", " else if (h.indexOf('#/candidates') === 0) viewCandidates();\n else if (h.indexOf('#/new') === 0) viewNew();"),
(" $('#nav-cand').style.fontWeight = h.indexOf('#/candidates') === 0 ? '700' : '500';",
" $('#nav-cand').style.fontWeight = h.indexOf('#/candidates') === 0 ? '700' : '500';\n $('#nav-new').style.fontWeight = h.indexOf('#/new') === 0 ? '700' : '500';"),
(' <div class="sub"><a href="#/candidates" id="nav-cand">표 후보값</a></div>',
' <div class="sub"><a href="#/candidates" id="nav-cand">표 후보값</a></div>\n <div class="sub"><a href="#/new" id="nav-new">새 교각 (S02)</a></div>'),
("<title>PierProof 시안 — 입력 묶음 확인·확정</title>", "<title>PierProof 시안 — 입력 묶음·새 교각 판별</title>"),
]
for a, b in pairs:
assert s.count(a) == 1, a
s = s.replace(a, b)
P.write_text(s, encoding="utf-8")
print("patched", P)