pdftract/crates/pdftract-cli/src/lib.rs
jedarden 1c6f26ecaa fix(bf-4mkhv): clean up unused imports in hash.rs
The bead description mentioned compile errors in hash.rs from API drift,
but those errors were either already fixed or misattributed. The API usage
was already correct:
- compute_fingerprint already takes 3 arguments with source
- len() already propagates Result with ?
- read_at method already used correctly
- Catalog fields accessed via trailer correctly

Only cleanup: removed unused std::fs::File and std::io imports.

Verification: notes/bf-4mkhv.md
2026-06-01 09:43:48 -04:00

40 lines
1 KiB
Rust

//! pdftract CLI library.
//!
//! This library exports the CLI's internal modules for integration testing.
pub mod cache_cmd;
pub mod classify;
pub mod cli;
pub mod codegen;
pub mod grep;
pub mod hash;
pub mod header;
pub mod inspect;
pub mod mcp;
pub mod middleware;
pub mod migrate;
pub mod output;
pub mod pages;
pub mod password;
pub mod profiles_cmd;
pub mod serve;
pub mod url;
pub mod validate;
pub mod verify_receipt;
// Re-export diagnostics for testing
pub use pdftract_core::diagnostics::{DiagCode, DiagInfo, DIAGNOSTIC_CATALOG};
// Export CLI types for documentation generation
pub use crate::cli::{Cli, Commands};
/// Generate CLI reference markdown from the clap command tree.
///
/// This function uses clap-markdown to auto-generate comprehensive CLI
/// documentation from the clap derive annotations. It includes all
/// subcommands, flags, arguments, and options with their types, defaults,
/// and help text.
pub fn generate_cli_markdown() -> String {
// clap-markdown 0.1 uses help_markdown function
clap_markdown::help_markdown::<Cli>()
}