Files

64 lines
1.7 KiB
TOML

[package]
name = "hanzo-extract"
version = "0.1.0"
edition = "2021"
authors = ["Hanzo AI <[email protected]>"]
description = "Content extraction with built-in sanitization - web, PDF, conversations"
license = "MIT OR Apache-2.0"
repository = "https://github.com/hanzoai/extract"
homepage = "https://hanzoai.github.io/extract"
documentation = "https://docs.rs/hanzo-extract"
readme = "README.md"
keywords = ["extraction", "pdf", "web", "sanitization", "llm"]
categories = ["development-tools", "web-programming", "text-processing"]
[features]
default = ["web", "pdf"]
web = ["reqwest", "scraper"]
pdf = ["lopdf"]
conversations = ["walkdir", "sha2", "hex", "chrono", "rand"]
sanitize = [] # Placeholder - requires hanzo-guard (not yet on crates.io)
full = ["web", "pdf", "conversations"]
[dependencies]
# Core
thiserror = "2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
async-trait = "0.1"
tokio = { version = "1", features = ["full"] }
# Web extraction
reqwest = { version = "0.12", features = ["json"], optional = true }
scraper = { version = "0.22", optional = true }
# PDF extraction
lopdf = { version = "0.34", optional = true }
# Conversation extraction
walkdir = { version = "2.5", optional = true }
sha2 = { version = "0.10", optional = true }
hex = { version = "0.4", optional = true }
chrono = { version = "0.4", optional = true }
rand = { version = "0.8", optional = true }
# URL handling
url = "2.5"
# Text processing
regex = "1.10"
unicode-segmentation = "1.10"
[dev-dependencies]
tokio-test = "0.4"
[[bin]]
name = "extract-conversations"
path = "src/bin/extract-conversations.rs"
required-features = ["conversations"]
[[bin]]
name = "extract-web"
path = "src/bin/extract-web.rs"
required-features = ["web"]