docling 0.34.0

DocumentConverter and format backends for docling.rs (a Rust port of docling).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The target API, end to end.
//!
//! Run with:  cargo run -p docling.rs --example convert -- path/to/file.md

use docling::{DocumentConverter, SourceDocument};

fn main() {
    let path = std::env::args()
        .nth(1)
        .unwrap_or_else(|| "sample.md".to_string());

    let converter = DocumentConverter::new();
    let result = converter
        .convert(SourceDocument::from_file(&path).unwrap())
        .unwrap();
    println!("{}", result.document.export_to_markdown());
}