[package]
name = "mdkit"
version = "0.5.3"
edition = "2021"
rust-version = "1.88"
authors = ["mdkit contributors"]
description = "Get markdown out of any document — Pandoc + pdfium + platform-native OCR, dispatched per format."
documentation = "https://docs.rs/mdkit"
homepage = "https://github.com/mdkit-project/mdkit"
repository = "https://github.com/mdkit-project/mdkit"
license = "MIT OR Apache-2.0"
readme = "README.md"
keywords = ["markdown", "pdf", "docx", "pandoc", "ocr"]
categories = ["text-processing", "parser-implementations", "filesystem"]
exclude = [
"/.github",
"/tests/fixtures/large/*",
]
[features]
default = ["pdf", "calamine", "csv", "html"]
pdf = ["dep:pdfium-render", "dep:tempfile"]
calamine = ["dep:calamine"]
csv = ["dep:csv"]
html = ["dep:html2md"]
pandoc = []
ocr-platform = ["dep:objc2", "dep:objc2-foundation", "dep:objc2-app-kit", "dep:objc2-core-graphics", "dep:objc2-vision", "dep:windows", "dep:windows-future"]
ocr-onnx = []
full = ["pdf", "pandoc", "ocr-platform", "ocr-onnx", "calamine", "csv", "html"]
[dependencies]
thiserror = "2"
pdfium-render = { version = "0.9", optional = true, default-features = false, features = ["thread_safe", "pdfium_latest", "image_latest"] }
calamine = { version = "0.34", optional = true }
csv = { version = "1", optional = true }
html2md = { version = "0.2", optional = true }
tempfile = { version = "3", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6", optional = true }
objc2-foundation = { version = "0.3", optional = true }
objc2-app-kit = { version = "0.3", optional = true, features = ["NSImage", "NSImageRep"] }
objc2-core-graphics = { version = "0.3", optional = true }
objc2-vision = { version = "0.3", optional = true, features = ["alloc", "VNRequest", "VNRequestHandler", "VNRecognizeTextRequest", "VNObservation", "objc2-core-graphics"] }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.62", optional = true, features = [
"Storage",
"Storage_Streams",
"Graphics_Imaging",
"Media_Ocr",
"Globalization",
"Foundation",
"Win32_System_WinRT",
] }
windows-future = { version = "0.3", optional = true }
[dev-dependencies]
tempfile = "3"
[lints.rust]
unsafe_code = "deny"
missing_docs = "warn"
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"