Introduces a ProcessMode enum that controls how far the PDF pipeline runs, enabling fast document triage without paying extraction or markdown conversion costs. Exposed via --detect-only and --analyze flags in both pdf2md and detect-pdf CLIs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
393 B
Rust
12 lines
393 B
Rust
/// Controls how far the PDF processing pipeline runs.
|
|
#[derive(Debug, Clone, Default, PartialEq)]
|
|
pub enum ProcessMode {
|
|
/// Only detect PDF type. Very fast — no text extraction.
|
|
DetectOnly,
|
|
/// Detect type + extract text + compute layout complexity. Skips markdown.
|
|
Analyze,
|
|
/// Full pipeline: detect, extract, convert to markdown (default).
|
|
#[default]
|
|
Full,
|
|
}
|