{"id":46832914,"url":"https://github.com/ohah/hwpjs","last_synced_at":"2026-03-15T23:48:54.034Z","repository":{"id":160711042,"uuid":"390684804","full_name":"ohah/hwpjs","owner":"ohah","description":"hwpjs","archived":false,"fork":false,"pushed_at":"2026-03-01T10:16:19.000Z","size":51025,"stargazers_count":138,"open_issues_count":2,"forks_count":17,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T12:49:57.764Z","etag":null,"topics":["hwp","hwp5","hwpviewer","javascript","rust"],"latest_commit_sha":null,"homepage":"https://ohah.github.io/hwpjs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-07-29T10:21:24.000Z","updated_at":"2026-03-01T09:12:47.000Z","dependencies_parsed_at":"2023-05-13T14:45:30.209Z","dependency_job_id":null,"html_url":"https://github.com/ohah/hwpjs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ohah/hwpjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohah%2Fhwpjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohah%2Fhwpjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohah%2Fhwpjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohah%2Fhwpjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohah","download_url":"https://codeload.github.com/ohah/hwpjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohah%2Fhwpjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30330576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hwp","hwp5","hwpviewer","javascript","rust"],"created_at":"2026-03-10T10:32:10.438Z","updated_at":"2026-03-15T23:48:54.026Z","avatar_url":"https://github.com/ohah.png","language":"Rust","readme":"# HWPJS\r\n\r\n한글과컴퓨터의 한/글 문서 파일(.hwp)을 읽고 파싱하는 라이브러리입니다.\r\n\r\n본 제품은 한글과컴퓨터의 한/글 문서 파일(.hwp) 공개 문서를 참고하여 개발하였습니다.\r\n[공개 문서 다운로드](https://www.hancom.com/etc/hwpDownload.do)\r\n\r\n## 주요 기능\r\n\r\n- **JSON 변환**: HWP 문서 구조를 JSON으로 추출\r\n- **Markdown 변환**: 텍스트, 테이블, 이미지를 포함한 Markdown 변환\r\n- **HTML 변환**: CSS 스타일링이 적용된 완전한 HTML 문서 생성\r\n- **CLI 도구**: 단일 파일 변환, 배치 처리, 이미지 추출\r\n- **멀티 플랫폼**: Node.js, Web(WASM), React Native 지원\r\n\r\n## 프로젝트 구조\r\n\r\n이 프로젝트는 Bun 워크스페이스를 사용한 모노레포 구조입니다.\r\n\r\n```\r\nhwpjs/\r\n├── crates/\r\n│   └── hwp-core/          # 공유 Rust 라이브러리 (핵심 HWP 파싱 로직)\r\n├── packages/\r\n│   └── hwpjs/             # 멀티 플랫폼 패키지 (Node.js, Web, React Native)\r\n├── examples/              # 사용 예제\r\n│   ├── node/              # Node.js 예제\r\n│   ├── web/               # Web 예제 (React + Vite)\r\n│   ├── react-native/      # React Native 예제\r\n│   └── cli/               # CLI 사용 예제\r\n├── documents/             # 문서 사이트 (Rspress)\r\n└── e2e/                   # E2E 테스트 (Playwright)\r\n```\r\n\r\n## 기술 스택\r\n\r\n- **Rust**: 핵심 파싱/변환 로직\r\n- **NAPI-RS**: Node.js 네이티브 모듈\r\n- **Craby**: React Native 바인딩\r\n- **Bun**: 워크스페이스 관리\r\n- **Rspress**: 문서 사이트\r\n\r\n## 사용법\r\n\r\n### 설치\r\n\r\n```bash\r\nnpm install @ohah/hwpjs\r\n```\r\n\r\n### API 사용\r\n\r\n```typescript\r\nimport { toJson, toMarkdown, toHtml, fileHeader } from '@ohah/hwpjs';\r\nimport { readFileSync } from 'fs';\r\n\r\nconst data = readFileSync('./document.hwp');\r\n\r\n// JSON 변환\r\nconst json = toJson(data);\r\n\r\n// Markdown 변환\r\nconst { markdown, images } = toMarkdown(data, {\r\n  image: 'base64',\r\n  useHtml: true,\r\n});\r\n\r\n// HTML 변환\r\nconst html = toHtml(data, {\r\n  includeVersion: true,\r\n});\r\n\r\n// 파일 헤더 추출\r\nconst header = fileHeader(data);\r\n```\r\n\r\n### CLI 사용\r\n\r\n```bash\r\n# 전역 설치\r\nnpm install -g @ohah/hwpjs\r\n\r\n# JSON 변환\r\nhwpjs to-json document.hwp -o output.json --pretty\r\n\r\n# Markdown 변환\r\nhwpjs to-markdown document.hwp -o output.md --include-images\r\n\r\n# HTML 변환\r\nhwpjs to-html document.hwp -o output.html\r\n\r\n# 파일 정보 확인\r\nhwpjs info document.hwp\r\n\r\n# 이미지 추출\r\nhwpjs extract-images document.hwp -o ./images\r\n\r\n# 배치 변환\r\nhwpjs batch ./documents -o ./output --format json --recursive\r\n```\r\n\r\n더 자세한 내용은 [CLI 가이드](https://ohah.github.io/hwpjs/guide/cli)를 참고하세요.\r\n\r\n## 개발 시작하기\r\n\r\n### 환경 설정\r\n\r\nmise(미즈)를 사용하여 필요한 도구를 설치합니다:\r\n\r\n```bash\r\nmise install\r\n```\r\n\r\n### 스크립트\r\n\r\n- `bun run test:rust` - Rust 테스트 실행\r\n- `bun run test:node` - Node.js 테스트 실행\r\n- `bun run dev:docs` - 문서 사이트 개발 서버\r\n- `bun run dev:web` - Web 예제 개발 서버\r\n- `bun run lint` - 린트 검사\r\n- `bun run format` - 코드 포맷팅\r\n- `bun run build` - 전체 빌드\r\n\r\n## 참고한 프로젝트\r\n\r\n- [pyhwp](https://github.com/mete0r/pyhwp)\r\n- [hwpjs](https://github.com/hahnlee/hwp.js)\r\n- [ruby-hwp](https://github.com/mete0r/ruby-hwp)\r\n- [libhwp](https://github.com/accforaus/libhwp)\r\n- [hwplib](https://github.com/neolord0/hwplib)\r\n\r\n## 이슈 제안 및 건의\r\n\r\n해당 깃허브에 남겨주세요.\r\n\r\n## 라이센스\r\n\r\n이 프로젝트는 [MIT 라이센스](LICENSE)를 따릅니다.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohah%2Fhwpjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohah%2Fhwpjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohah%2Fhwpjs/lists"}