Skip to main content

Crate undocx

Crate undocx 

Source
Expand description

§undocx

Fast DOCX to Markdown converter.

§Quick Start

let md = undocx::convert("document.docx").unwrap();

§With Options

let md = undocx::builder()
    .skip_images()
    .strict()
    .convert("document.docx")
    .unwrap();

§Reusable Converter

let converter = undocx::Converter::builder()
    .save_images_to("./images")
    .build();

let md = converter.convert("document.docx").unwrap();

§Custom Pipeline

See DocxToMarkdown::with_components for custom extractor/renderer pipelines.

Re-exports§

pub use converter::DocxToMarkdown;
pub use error::Error;
pub use error::Result;
pub use localization::parse_heading_style;

Modules§

adapters
converter
Core conversion engine for the DOCX → Markdown pipeline.
core
error
Error types for docx2md.
localization
Heading style parsing utilities.
render
Output rendering for the conversion pipeline.

Structs§

Builder
Fluent builder for configuring DOCX to Markdown conversion.
ConvertOptions
Options for DOCX to Markdown conversion.

Enums§

ImageHandling
Specifies how images should be handled during conversion.

Functions§

builder
Start building a configured converter.
convert
Convert a DOCX file at the given path to Markdown.
convert_bytes
Convert DOCX bytes to Markdown.
convert_reader
Convert DOCX from a reader to Markdown.

Type Aliases§

Converter
Type alias for the default converter configuration.