1990~2000년대 학과 방명록 “열린마음” 디지털 아카이브 프로젝트.
열린마음-archive/
├── scripts/
│ └── 1_preprocess.py # 소스 사진 → input/ 정규화 (HEIC 변환)
├── process.py # OCR 처리 + 뷰어 빌드 (메인 스크립트)
├── input/ # 정규화된 JPG 이미지 (744장)
├── data/
│ └── manifest.json # 13권 볼륨 목록
├── output/
│ ├── json/ # 페이지별 OCR 결과
│ └── archive.json # 통합 아카이브 데이터
├── viewer.html # 웹 뷰어 (브라우저로 열기)
└── requirements.txt
cd ~/열린마음-archive
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python scripts/1_preprocess.py
# → input/ 에 744장 JPG 복사/변환
# → data/manifest.json 생성
# API 키 설정
export ANTHROPIC_API_KEY='sk-ant-...'
# 배치 모드 (권장 - 50% 비용 절감, 비동기)
.venv/bin/python process.py --mode batch
# 완료 확인 (배치 완료까지 최대 24시간)
.venv/bin/python process.py --mode check
# 실시간 모드 (즉시 확인 가능, 비용 2배)
.venv/bin/python process.py --mode live
.venv/bin/python process.py --mode build
.venv/bin/python -m http.server 8000
# 브라우저에서 http://localhost:8000/viewer.html 열기
| 모드 | 예상 비용 (744장) |
|---|---|
| batch (claude-haiku) | 약 $1~2 |
| live (claude-haiku) | 약 $2~4 |
--mode batch 실행 필요)