- 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>
23 lines
1.3 KiB
Python
23 lines
1.3 KiB
Python
"""replace_sanoe_images_xlsx.py 가 '형상 일람(모델)' 상단의 산외 형상일람 이미지 3장(행 137·177·242)까지 바꿔 버린 것을 복원(형상일람_산외_*.png, 폭 1260)."""
|
|
import hashlib, shutil
|
|
from pathlib import Path
|
|
import openpyxl
|
|
from openpyxl.drawing.image import Image as XLImage
|
|
from openpyxl.styles import Font
|
|
NAME = "4개교_공통사항_종합.xlsx"
|
|
REV = Path(r"D:\★Pier 자료\프로그램\Pier_T\검토파일"); ORIG = Path(r"D:\★Pier 자료\심수석님 검토 파일"); CAP = REV / "수정후_캡처"
|
|
wb = openpyxl.load_workbook(REV / NAME); sh = wb["형상 일람(모델)"]
|
|
fix = {137: ("산외 기초", "형상일람_산외_기초.png"), 177: ("산외 코핑", "형상일람_산외_코핑.png"), 242: ("산외 기둥", "형상일람_산외_기둥.png")}
|
|
n = 0
|
|
for i, im in enumerate(sh._images):
|
|
r = im.anchor._from.row
|
|
if r in fix:
|
|
t, f = fix[r]
|
|
new = XLImage(str(CAP / f)); h = new.height * 1260 / new.width; new.width, new.height = 1260, int(h)
|
|
new.anchor = im.anchor; sh._images[i] = new
|
|
sh.cell(row=r, column=1, value=t); n += 1
|
|
print("restored", n)
|
|
wb.save(REV / NAME); shutil.copy2(REV / NAME, ORIG / NAME)
|
|
sha = lambda p: hashlib.sha256(Path(p).read_bytes()).hexdigest()
|
|
print("sha equal:", sha(REV / NAME) == sha(ORIG / NAME), sha(REV / NAME)[:16], len(sh._images))
|