[package]
name = "chatpack"
version = "0.5.1"
edition = "2024"
description = "Prepare chat data for RAG / LLM ingestion. Supports Telegram, WhatsApp, Instagram, Discord."
authors = ["Mukhammedali Berektassuly <mukhammedali@berektassuly.com>"]
license = "MIT"
repository = "https://github.com/berektassuly/chatpack"
homepage = "https://berektassuly.com"
readme = "README.md"
keywords = ["telegram", "whatsapp", "instagram", "discord", "llm"]
categories = ["parsing", "text-processing"]
[features]
default = ["full"]
full = ["telegram", "whatsapp", "instagram", "discord", "csv-output", "json-output", "streaming"]
telegram = ["dep:serde_json"]
whatsapp = ["dep:regex"]
instagram = ["dep:serde_json"]
discord = ["dep:serde_json", "dep:regex", "dep:csv"]
csv-output = ["dep:csv"]
json-output = ["dep:serde_json"]
streaming = []
async = ["dep:tokio", "dep:tokio-stream", "dep:async-trait"]
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
regex = { version = "1.11", optional = true }
serde_json = { version = "1.0", optional = true }
csv = { version = "1.3", optional = true }
tokio = { version = "1", features = ["fs", "io-util", "rt", "macros"], optional = true }
tokio-stream = { version = "0.1", optional = true }
async-trait = { version = "0.1", optional = true }
[lib]
name = "chatpack"
path = "src/lib.rs"
[[bench]]
name = "parsing"
harness = false
[profile.release]
opt-level = 3
lto = true
strip = true
[profile.bench]
opt-level = 3
lto = "thin"
[dev-dependencies]
cargo-husky = { version = "1", features = ["precommit-hook", "run-cargo-clippy", "run-cargo-test"] }
tempfile = "3.10"
proptest = "1.4"
criterion = { version = "0.5", features = ["html_reports"] }
serde_json = "1.0"
regex = "1.11"
csv = "1.3"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
struct_excessive_bools = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
doc_markdown = "allow"
cast_precision_loss = "allow"
cast_possible_wrap = "allow"
must_use_candidate = "allow"
module_name_repetitions = "allow"
too_many_lines = "allow"
unreadable_literal = "allow"
unicode_not_nfc = "allow"
map_unwrap_or = "allow"
format_push_string = "allow"
trivially_copy_pass_by_ref = "allow"
match_same_arms = "allow"
uninlined_format_args = "allow"
collapsible_if = "allow"
unnecessary_join = "allow"
redundant_closure_for_method_calls = "allow"