How chrisryugj/kordoc works
Kordoc converts Korean and office documents into Markdown and structured blocks, with CLI, library, and MCP entry points. The main workflow detects an input format, parses it into a shared document representation, and returns Markdown, page content, and metadata. Separate product branches support document creation, form filling, visual rendering, comparison and layout-preserving edits, OCR, and review/redaction. The README documents these capabilities; unsampled implementation details are represented at their existing source paths, without asserting unshown internal calls.
Main entry points: index.ts Library API · cli.ts CLI · mcp.ts MCP server · detect.ts Format detection
Components 22
User interfaces
- CLI
src/cli.ts - MCP server
src/mcp.ts - Library API
src/index.ts
Document parsing
- Format detection
src/detect.ts - HWP 3 parser
src/hwp3/parser.ts - HWP 5 parser
src/hwp5/parser.ts - HWPX parser
src/hwpx/parser.ts - PDF parser
src/pdf/parser.ts - XLS and XLSX
src/xlsx/parser.ts - DOCX parser
src/docx/parser.ts - Other formats
src/pptx/parser.ts
Document operations
- Document rendering
src/render/svg-render.ts - HWPX generation
src/hwpx/generator.ts - Form filling
src/form/filler.ts - Document comparison
src/diff/compare.ts - Layout-preserving edits
src/roundtrip/session.ts
Review and OCR
- Local OCR
src/ocr/engine.ts - Privacy redaction
src/redact.ts - Document validation
src/validate.ts
Shared document model
- Table and Markdown conversion
src/table/builder.ts - Markdown and structured result
src/types.ts
Other components
- User or agent
Connections 23
- User or agent → CLI: runs commands
README.md - User or agent → MCP server: uses tools
README.md - User or agent → Library API: calls library
README.md - CLI → Library API: requests parsing
- MCP server → Library API: offers document tools
- Library API → Format detection: detects format
src/index.ts - Library API → HWP 3 parser: dispatches HWP3
src/index.ts - Library API → HWP 5 parser: dispatches HWP5
src/index.ts - Library API → HWPX parser: dispatches HWPX
src/index.ts - Library API → PDF parser: dispatches PDF
src/index.ts - Library API → XLS and XLSX: dispatches XLSX
src/index.ts - Library API → DOCX parser: dispatches DOCX
src/index.ts - Library API → Other formats: dispatches PPTX
src/index.ts - Library API → Table and Markdown conversion: converts blocks
src/index.ts - Library API → Markdown and structured result: returns parsed content
README.md - User or agent → Local OCR: requests OCR
README.md - User or agent → Document rendering: requests preview
README.md - User or agent → HWPX generation: requests creation
README.md - User or agent → Form filling: fills template
README.md - User or agent → Document comparison: compares documents
README.md - User or agent → Layout-preserving edits: requests edits
README.md - User or agent → Privacy redaction: requests masking
README.md - User or agent → Document validation: requests review
README.md