리뉴얼

This commit is contained in:
Gnill82
2025-10-27 17:04:37 +09:00
parent faef6ce8bd
commit af7de76bc0
57 changed files with 479079 additions and 633159 deletions

View File

@ -0,0 +1,107 @@
# 유틸리티 스크립트
JSON 데이터 탐색 및 정보 조회를 위한 유틸리티 도구 모음
---
## 📋 스크립트 목록
### list_asset_types.py
**용도**: AnimMontage.json의 모든 Asset 타입 목록 출력
**사용 예시**:
```bash
python utils/list_asset_types.py
```
**출력**:
```
총 743개 Asset 발견
Asset 타입 분포:
- AnimMontage: 743개
```
**활용 사례**:
- AnimMontage.json에 어떤 타입의 Asset이 있는지 확인
- 새로운 데이터 소스 추가 시 구조 파악
---
### list_datatables.py
**용도**: DataTable.json의 모든 DataTable Asset 목록 출력
**사용 예시**:
```bash
python utils/list_datatables.py
```
**출력**:
```
총 23개 DataTable 발견:
1. DT_CharacterStat (10 rows)
2. DT_CharacterAbility (10 rows)
3. DT_Skill (91 rows)
4. DT_NPCAbility (15 rows)
...
```
**활용 사례**:
- DataTable.json에 어떤 테이블이 있는지 확인
- 새로운 DataTable 추가 시 Row 개수 확인
- 데이터 구조 탐색
---
## 🔧 개발자 가이드
### 새로운 유틸리티 추가 방법
1. **파일 생성**: `utils/` 폴더에 새 스크립트 생성
2. **명명 규칙**: `{동사}_{대상}.py` (예: `extract_skill_names.py`)
3. **공통 패턴 준수**:
```python
#!/usr/bin/env python3
"""
[스크립트 용도 설명]
"""
import json
from pathlib import Path
# 프로젝트 루트
PROJECT_ROOT = Path(__file__).parent.parent.parent
DATA_DIR = PROJECT_ROOT / "원본데이터"
def main():
"""메인 실행 함수"""
# JSON 로드
with open(DATA_DIR / "DataTable.json", 'r', encoding='utf-8') as f:
data = json.load(f)
# 로직 구현
# ...
# 결과 출력
print(f"결과: ...")
if __name__ == "__main__":
main()
```
4. **README 업데이트**: 이 파일에 새 스크립트 설명 추가
---
## 📚 관련 파일
- **../config.py** - 프로젝트 전역 설정
- **../../원본데이터/** - JSON 데이터 소스
- **../../ARCHITECTURE.md** - 데이터 구조 상세 문서
---
**작성자**: AI-assisted Development Team
**최종 업데이트**: 2025-10-27

View File

@ -0,0 +1,25 @@
"""모든 Asset Type 확인"""
import json
from collections import Counter
with open('../../원본데이터/DataTable.json', 'r', encoding='utf-8') as f:
data = json.load(f)
assets = data.get('Assets', [])
print(f"총 Assets: {len(assets)}\n")
# Type 카운트
types = [a.get('Type', 'Unknown') for a in assets]
type_counts = Counter(types)
print("Asset Type 분포:")
for asset_type, count in type_counts.most_common():
print(f" - {asset_type}: {count}")
# 이름 샘플 (각 타입별 3개씩)
print("\n\nType별 이름 샘플:")
for asset_type, count in type_counts.most_common():
print(f"\n{asset_type} ({count}개):")
samples = [a.get('Name', '') for a in assets if a.get('Type') == asset_type][:5]
for sample in samples:
print(f" - {sample}")

View File

@ -0,0 +1,19 @@
"""모든 DataTable 나열"""
import json
with open('../../원본데이터/DataTable.json', 'r', encoding='utf-8') as f:
data = json.load(f)
assets = data.get('Assets', [])
print(f"총 Assets: {len(assets)}\n")
# DataTable만 필터링
datatables = [a for a in assets if a.get('Type') == 'DataTable']
print(f"DataTable 개수: {len(datatables)}\n")
# 이름 출력
print("DataTable 목록:")
for dt in datatables:
name = dt.get('Name', '')
rows_count = len(dt.get('Rows', {}))
print(f" - {name} ({rows_count} rows)")