parse-book-source 0.3.0

Terminal reader for novel
Documentation
[package]
name = "parse-book-source"
version = "0.3.0"
edition = "2024"
description = "Terminal reader for novel"
authors = ["yexiyue <yexiyue666@qq.com>"]
license = "MIT"
keywords = ["CLI", "Terminal", "Novel", "Reader"]
repository = "https://github.com/yexiyue/parse-book-source"

[dependencies]
# JSONPath(对齐 RFC 9535)
jsonpath-rust = "1.0"
# v2 HTML 抽取后端(jQuery 式 API + :has()/:contains() 扩展伪类)
dom_query = "0.28"
# v2 规则正则统一用 fancy-regex(支持前后向断言/反向引用,兼容 Legado 风格规则)
fancy-regex = "0.18"
# v2 取页端口的异步 trait(dyn Fetcher 需要)
async-trait = "0.1"
# v2 按 charset 解码响应(GBK/gb18030/big5 等)
encoding_rs = "0.8"
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
reqwest = { version = "0.12.24", default-features = false, features = [
    "json",
    "rustls-tls",
    "cookies",
] }

# 反爬:复用系统浏览器解 Cloudflare 挑战(纯 Rust CDP 客户端,无 C 依赖)。
# 以 `browser` feature 门控,默认构建不含。
chromiumoxide = { version = "0.7", default-features = false, features = [
    "tokio-runtime",
], optional = true }
futures-util = { version = "0.3", optional = true }

# 从 Rust 类型自动生成 JSON Schema(尊重 serde 属性);以 `schema` feature 门控,
# 默认构建不含。配套 `examples/gen_schema.rs` + 防漂移测试 `schema_is_in_sync`。
schemars = { version = "0.8", optional = true }

[features]
default = []
# 启用基于系统浏览器的反爬取页(BrowserFetcher / EscalatingFetcher)。
browser = ["dep:chromiumoxide", "dep:futures-util"]
# 启用 JSON Schema 生成(schemars 派生 + gen 示例 + 防漂移测试)。
schema = ["dep:schemars"]

# gen_schema 示例:`cargo run -p parse-book-source --features schema --example gen_schema`
[[example]]
name = "gen_schema"
required-features = ["schema"]


# scraper = "0.21.0"
# chrono = { version = "0.4.38", features = ["serde"] }
# base64 = "0.22.1"
# cbc = "0.1.2"
# ring = { version = "0.17.8", features = ["std"] }
# aes = { version = "0.8.4", features = ["hazmat"] }