@clazic/kordoc 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +41 -22
  2. package/package.json +5 -12
package/README.md CHANGED
@@ -2,14 +2,11 @@
2
2
 
3
3
  **모두 파싱해버리겠다.**
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/kordoc.svg)](https://www.npmjs.com/package/kordoc)
6
- [![license](https://img.shields.io/npm/l/kordoc.svg)](https://github.com/chrisryugj/kordoc/blob/main/LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/@clazic/kordoc.svg)](https://www.npmjs.com/package/@clazic/kordoc)
6
+ [![license](https://img.shields.io/npm/l/@clazic/kordoc.svg)](https://github.com/clazic/kordoc/blob/main/LICENSE)
7
7
 
8
8
  HWP, HWPX, PDF, XLSX, DOCX — 관공서에서 쏟아지는 모든 문서를 파싱하고, 비교하고, 분석하고, 생성합니다.
9
9
 
10
- [English](./README-EN.md)
11
-
12
- ![kordoc 데모](./demo.gif)
13
10
 
14
11
  ---
15
12
 
@@ -108,7 +105,7 @@ HWP, HWPX, PDF, XLSX, DOCX — 관공서에서 쏟아지는 모든 문서를 파
108
105
  ## 설치
109
106
 
110
107
  ```bash
111
- npm install kordoc
108
+ npm install @clazic/kordoc
112
109
 
113
110
  # PDF 파싱이 필요하면 (선택)
114
111
  npm install pdfjs-dist
@@ -119,7 +116,7 @@ npm install pdfjs-dist
119
116
  ### 문서 파싱
120
117
 
121
118
  ```typescript
122
- import { parse } from "kordoc"
119
+ import { parse } from "@clazic/kordoc"
123
120
  import { readFileSync } from "fs"
124
121
 
125
122
  const buffer = readFileSync("사업계획서.hwpx")
@@ -135,7 +132,7 @@ if (result.success) {
135
132
  ### 문서 비교 (신구대조표)
136
133
 
137
134
  ```typescript
138
- import { compare } from "kordoc"
135
+ import { compare } from "@clazic/kordoc"
139
136
 
140
137
  const diff = await compare(구버전Buffer, 신버전Buffer)
141
138
  // diff.stats → { added: 3, removed: 1, modified: 5, unchanged: 42 }
@@ -147,7 +144,7 @@ HWP vs HWPX 크로스 포맷 비교도 가능합니다.
147
144
  ### 양식 필드 추출
148
145
 
149
146
  ```typescript
150
- import { parse, extractFormFields } from "kordoc"
147
+ import { parse, extractFormFields } from "@clazic/kordoc"
151
148
 
152
149
  const result = await parse(buffer)
153
150
  if (result.success) {
@@ -160,7 +157,7 @@ if (result.success) {
160
157
  ### HWPX 생성 (역변환)
161
158
 
162
159
  ```typescript
163
- import { markdownToHwpx } from "kordoc"
160
+ import { markdownToHwpx } from "@clazic/kordoc"
164
161
 
165
162
  const hwpxBuffer = await markdownToHwpx("# 제목\n\n본문 텍스트\n\n| 이름 | 직급 |\n| --- | --- |\n| 홍길동 | 과장 |")
166
163
  writeFileSync("출력.hwpx", Buffer.from(hwpxBuffer))
@@ -186,23 +183,45 @@ const result = await parse(buffer, {
186
183
  ## CLI
187
184
 
188
185
  ```bash
189
- npx kordoc 사업계획서.hwpx # 터미널 출력
190
- npx kordoc 보고서.hwp -o 보고서.md # 파일 저장
191
- npx kordoc *.pdf -d ./변환결과/ # 일괄 변환
192
- npx kordoc 검토서.hwpx --format json # JSON (blocks + metadata 포함)
193
- npx kordoc 보고서.hwpx --pages 1-3 # 페이지 범위
194
- npx kordoc watch ./수신함 -d ./변환결과 # 폴더 감시 모드
195
- npx kordoc watch ./문서 --webhook https://api/hook # 웹훅 알림
186
+ # 전역 설치 (권장)
187
+ npm install -g @clazic/kordoc
188
+
189
+ kordoc 사업계획서.hwpx # 터미널 출력
190
+ kordoc 보고서.hwp -o 보고서.md # 파일 저장
191
+ kordoc *.pdf -d ./변환결과/ # 일괄 변환
192
+ kordoc 검토서.hwpx --format json # JSON (blocks + metadata 포함)
193
+ kordoc 보고서.hwpx --pages 1-3 # 페이지 범위
194
+ kordoc watch ./수신함 -d ./변환결과 # 폴더 감시 모드
195
+ kordoc watch ./문서 --webhook https://api/hook # 웹훅 알림
196
196
  ```
197
197
 
198
198
  ## MCP 서버 (Claude / Cursor / Windsurf)
199
199
 
200
+ ### 원격 MCP (설치 불필요 — 파일을 base64로 전송)
201
+
200
202
  ```json
201
203
  {
202
204
  "mcpServers": {
203
205
  "kordoc": {
204
- "command": "npx",
205
- "args": ["-y", "kordoc-mcp"]
206
+ "serverUrl": "https://kordoc-mcp.clazic.workers.dev"
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+ > HWPX, XLSX, DOCX, PDF 지원. HWP 5.x는 로컬 MCP 사용.
213
+
214
+ ### 로컬 MCP (HWP 5.x 포함 전 포맷, 파일 경로 직접 접근)
215
+
216
+ ```bash
217
+ npm install -g @clazic/kordoc
218
+ ```
219
+
220
+ ```json
221
+ {
222
+ "mcpServers": {
223
+ "kordoc": {
224
+ "command": "kordoc-mcp"
206
225
  }
207
226
  }
208
227
  }
@@ -253,7 +272,7 @@ import type {
253
272
  DiffResult, BlockDiff, CellDiff, DiffChangeType,
254
273
  FormField, FormResult,
255
274
  OcrProvider, WatchOptions,
256
- } from "kordoc"
275
+ } from "@clazic/kordoc"
257
276
  ```
258
277
 
259
278
  ## 지원 포맷
@@ -272,8 +291,8 @@ import type {
272
291
 
273
292
  ## 만든 사람
274
293
 
275
- 대한민국 지방공무원. 광진구청에서 7년간 HWP 파일과 싸우다가 이걸 만들었습니다.
276
- 5개 공공 프로젝트에서 수천 건의 실제 관공서 문서를 파싱하며 검증했습니다.
294
+ chrisryugj님의 kordoc을 fork해서 수정하고 사용하고 있습니다.
295
+
277
296
 
278
297
  ## 라이선스
279
298
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clazic/kordoc",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Parse Korean documents (HWP, HWPX, PDF, XLSX, DOCX) to Markdown",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,8 +14,8 @@
14
14
  "module": "./dist/index.js",
15
15
  "types": "./dist/index.d.ts",
16
16
  "bin": {
17
- "kordoc": "./dist/cli.js",
18
- "kordoc-mcp": "./dist/mcp.js"
17
+ "kordoc": "dist/cli.js",
18
+ "kordoc-mcp": "dist/mcp.js"
19
19
  },
20
20
  "files": [
21
21
  "dist"
@@ -48,7 +48,7 @@
48
48
  "license": "MIT",
49
49
  "repository": {
50
50
  "type": "git",
51
- "url": "https://github.com/clazic/kordoc.git"
51
+ "url": "git+https://github.com/clazic/kordoc.git"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=18"
@@ -59,16 +59,9 @@
59
59
  "cfb": "1.2.2",
60
60
  "commander": "^13.0.0",
61
61
  "jszip": "^3.10.1",
62
+ "pdfjs-dist": "^4.10.38",
62
63
  "zod": "^3.23.0"
63
64
  },
64
- "peerDependencies": {
65
- "pdfjs-dist": ">=4.0.0"
66
- },
67
- "peerDependenciesMeta": {
68
- "pdfjs-dist": {
69
- "optional": true
70
- }
71
- },
72
65
  "devDependencies": {
73
66
  "@types/node": "^18.19.130",
74
67
  "pdfjs-dist": "^4.10.38",