skill_html2pptx
This is an AI project based on Anthropic's PPTX skill, utilizing Antigravity to continuously improve HTML to PPTX conversion functionality. It provides a universal test runner that automatically compares generated results with reference PPTX files and calculates the similarity of elements such as text, images, and graphics. Through automated reports and historical records, it helps developers quantify and track improvements in conversion logic, ensuring the accuracy and stability of the AI skill.
git clone https://github.com/comefeel99/skill_html2pptx.git
cd skill_html2pptx
npm installBefore / After Comparison
1 组Traditional HTML to PPTX conversion tools may lead to format errors, content loss, or inconsistencies with the original HTML layout, requiring extensive manual adjustments and resulting in low conversion accuracy.
By using Antigravity to optimize conversion logic and conduct automated testing, the generated PPTX documents can highly restore HTML content and styles, significantly improving similarity scores and reducing manual corrections.
description SKILL.md
Skill HTML to PPTX 테스팅
이 프로젝트는 Anthropic's skills/pptx를 기반으로 구축되었습니다. Antigravity를 활용하여 HTML을 PPTX로 변환하는 기능을 지속적으로 개선하고 검증하는 것이 주 목적입니다.
주요 워크플로우는 다음과 같습니다:
- 새로운 테스트 데이터 추가 (HTML 및 정답 PPTX)
- Antigravity를 활용하여 변환 로직 개선 및 정합성 향상
- 자동화된 테스트 러너를 통해 안정성 및 정확도 검증
🚀 주요 기능
- 범용 테스트 러너 (Generic Test Runner): 단일 스크립트(
run_test.js)로 모든 테스트 케이스 디렉토리를 처리할 수 있습니다. - 레퍼런스 자동 비교: 생성된 결과물을 레퍼런스 PPTX(
[테스트명].pptx)와 자동으로 비교하여 변경 사항을 감지합니다. - 자동화된 리포팅:
- 모든 테스트 실행 이력을 JSON 로그(
history.jsonl)로 저장합니다. - 보기 편한 마크다운 리포트(
HISTORY.md)를 자동으로 생성 및 갱신합니다.
- 모든 테스트 실행 이력을 JSON 로그(
- 유사도 점수 (Similarity Scoring): 텍스트, 이미지, 도형 등의 요소 개수를 기반으로 유사도(0-100%)를 계산하여 개선 정도를 수치화합니다.
🛠 사전 요구 사항
- Node.js (v14 이상 권장)
npm install을 통한 의존성 설치 완료
📂 프로젝트 구조
.
├── run_test.js # 메인 실행 스크립트: 생성 및 비교 수행
├── compare_pptx.js # 핵심 비교 로직 (유사도 계산 포함)
├── generate_report.js # 리포트 생성기 (JSONL -> Markdown 변환)
├── test_data/ # 테스트 케이스 폴더들
│ ├── test1/ # 테스트 케이스 예시 1
│ ├── test2/ # 테스트 케이스 예시 2
│ └── ...
└── test_result/
├── history.jsonl # 상세 실행 로그 (JSON Lines)
└── HISTORY.md # 테스트 결과 요약 리포트
💻 사용 방법
테스트 실행
특정 테스트 케이스(예: test2)를 실행하려면 러너에 해당 디렉터리 경로를 인자로 전달하세요:
node run_test.js test_data/test2
실행 과정:
- 생성 (Generation):
test_data/test2내의page_*.html파일들을 찾아 빈 파일을 제외하고test2_output.pptx로 병합 생성합니다. - 비교 (Comparison):
test2.pptx(레퍼런스) 파일이 존재하면 결과물과 비교를 수행합니다. - 리포팅 (Reporting): 결과를
test_result/history.jsonl에 기록하고test_result/HISTORY.md를 업데이트합니다.
결과 확인
test_result/HISTORY.md 파일을 열어 테스트 이력과 최신 실행 결과에 대한 상세 분석을 확인하세요.
리포트 예시:
| Timestamp | Test | Duration | Output | Slides | Similarity | Status |
|---|---|---|---|---|---|---|
| 2026-01-06-11:17 | test2 | 28.0s | 1.82 MB | 12 | 61.6% | ⚠️ Changed |
📊 비교 로직 (Similarity)
유사도 점수는 각 슬라이드별로 다음 요소들의 수량 차이를 기반으로 계산됩니다:
- 텍스트 블록 (가중치 40%)
- 이미지 (가중치 30%)
- 도형 (가중치 30%)
점수가 **100%**라면 생성된 슬라이드가 레퍼런스와 동일한 수의 요소를 가지고 있음을 의미합니다. 차이가 클수록 점수는 낮아집니다.
점수 = 1 - (|차이| / max(A, B))
Generated by Antigravity
forumUser Reviews (0)
Write a Review
No reviews yet
Statistics
User Rating
Rate this Skill