Add inspect subcommand structure with: - InspectArgs struct with clap parsing (file, port, bind, no_open, auth_token, compare) - Validation: non-loopback bind requires auth-token, file existence checks - Extraction pipeline integration (extract_pdf -> result_to_json) - InspectorState for caching extraction results - Axum router with placeholder index handler - Browser launcher with platform detection (Linux/macOS/Windows) - Ctrl-C handling via tokio::signal Acceptance criteria PASS: - Default invocation binds to 127.0.0.1:7676 - --no-open suppresses browser launcher - Non-loopback bind without --auth-token -> validation error - GET / returns 200 with placeholder HTML - cargo check/clippy/fmt pass WARN: Full integration test blocked by pre-existing classify.rs bug (out of scope for this bead). Closes: pdftract-5pbkp Co-Authored-By: Claude Code <claude@anthropic.com>
12 lines
304 B
Rust
12 lines
304 B
Rust
//! Inspector web debug viewer.
|
|
//!
|
|
//! This module implements Phase 7.9's `pdftract inspect` subcommand:
|
|
//! a local web server that renders PDF extraction results with
|
|
//! interactive debugging overlays.
|
|
|
|
pub mod args;
|
|
pub mod inspect;
|
|
pub mod render;
|
|
|
|
pub use args::InspectArgs;
|
|
pub use inspect::run;
|