1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! 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
//!
//! ## Using the builder API (recommended for library users)
//!
//! ```no_run
//! use std::path::Path;
//! use hwp2md::convert::ConvertOptions;
//!
//! // HWP/HWPX → Markdown (direction inferred from extensions)
//! ConvertOptions::new(Path::new("document.hwpx"), Path::new("document.md"))
//! .frontmatter(true)
//! .execute()
//! .expect("conversion failed");
//!
//! // Markdown → HWPX, overwrite if output exists
//! ConvertOptions::new(Path::new("document.md"), Path::new("document.hwpx"))
//! .force(true)
//! .execute()
//! .expect("conversion failed");
//! ```
//!
//! ## Using the low-level functions
//!
//! ```no_run
//! 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
//!
//! | Module | Purpose |
//! |--------|---------|
//! | [`convert`] | Top-level conversion entry points |
//! | [`ir`] | Intermediate representation (Document, Block, Inline, …) |
//! | [`error`] | [`Hwp2MdError`] error type |
//! | [`hwp`] | HWP 5.0 reader (CFB/OLE2) |
//! | [`hwpx`] | HWPX reader and writer (ZIP/XML) |
//! | [`md`] | Markdown reader and writer |
//!
//! See the [README](https://github.com/hephaex/hwp2md#readme) for detailed
//! usage, CLI reference, and format support matrix.
pub
pub use ConvertOptions;
pub use Hwp2MdError;