Skip to main content

Crate hwp2md

Crate hwp2md 

Source
Expand description

Bidirectional converter between HWP/HWPX documents and Markdown.

Supports HWP 5.0 (binary OLE2-based) and HWPX (ZIP/XML-based) as input or output, with a language-agnostic intermediate representation (ir) in between.

§Quick start

use std::path::Path;

// HWP/HWPX → Markdown
hwp2md::convert::to_markdown(
    Path::new("document.hwpx"),
    Some(Path::new("document.md")),
    None,   // assets_dir
    false,  // frontmatter
).expect("conversion failed");

// Markdown → HWPX
hwp2md::convert::to_hwpx(
    Path::new("document.md"),
    Some(Path::new("document.hwpx")),
    None,   // style template
).expect("conversion failed");

§Modules

ModulePurpose
convertTop-level conversion entry points
irIntermediate representation (Document, Block, Inline, …)
errorHwp2MdError error type
hwpHWP 5.0 reader (CFB/OLE2)
hwpxHWPX reader and writer (ZIP/XML)
mdMarkdown reader and writer

See the README for detailed usage, CLI reference, and format support matrix.

Re-exports§

pub use error::Hwp2MdError;

Modules§

convert
High-level conversion entry points for HWP/HWPX ↔ Markdown.
error
Error types for the hwp2md crate.
hwp
HWP 5.0 reader (CFB/OLE2 binary format).
hwpx
HWPX reader and writer (ZIP/XML format).
ir
Intermediate representation (IR) types shared by all readers and writers.
md
Markdown parser and writer built on top of the pulldown_cmark ecosystem.