usage: opp [-h] [--detect-format] [--resource-dir RESOURCE_DIR]
           [--report {html,text}] [--batch] [-o OUTPUT]
           [--target-format {md,xlf,both,html}] [--source-lang SOURCE_LANG]
           [--target-lang TARGET_LANG] [--style-map STYLE_MAP]
           [--no-embed-images] [--output-dir OUTPUT_DIR] [-v]
           [--ocr-engine {tesseract,rapidocr}] [--ocr-lang OCR_LANG]
           [--asr-engine {whisper}]
           [--model-size {tiny,base,small,medium,large-v3}] [--config CONFIG]
           [--no-cache] [--clear-cache] [--max-file-size MAX_FILE_SIZE]
           [--log-format {console,json}] [--load-dotenv] [--capabilities]
           [--validate-xliff] [--xliff-content XLIFF_CONTENT]
           [--xliff-file XLIFF_FILE]
           [files ...]

OPP - Omni Pre-Processor. Extract content from DOCX, PPTX, PDF, HTML, and EPUB
files.

positional arguments:
  files                 Input files or folders to process (DOCX, PPTX, PDF,
                        HTML, EPUB). Optional when --capabilities is set.

options:
  -h, --help            show this help message and exit
  --detect-format       Auto-detect file format before processing
  --resource-dir RESOURCE_DIR
                        Directory for storing extracted resources (images,
                        etc.)
  --report {html,text}  Generate report in specified format (html or text)
  --batch               Enable batch processing mode
  -o, --output OUTPUT   Output file for extracted content
  --target-format {md,xlf,both,html}
                        Output format for generated files: md (markdown), xlf
                        (XLIFF), both, html (PDF→HTML via pandoc)
  --source-lang SOURCE_LANG
                        Source language code (default: zh — the project's
                        primary translation direction)
  --target-lang TARGET_LANG
                        Target language code (required when --target-format is
                        xlf or both). Falls back to 'en' for md-only
                        extraction.
  --style-map STYLE_MAP
                        JSON mapping of style names to heading levels, e.g.
                        '{"a5": 1, "a6": 2}'
  --no-embed-images     Embed images as base64 data URIs instead of separate
                        files. Produces a self-contained markdown file that
                        can be piped through OL → pandoc without requiring the
                        image directory.
  --output-dir OUTPUT_DIR
                        Output directory for generated files
  -v, --verbose         Enable verbose output
  --ocr-engine {tesseract,rapidocr}
                        OCR engine to use for image files (default: tesseract
                        if installed)
  --ocr-lang OCR_LANG   Language for Tesseract OCR (e.g., eng, chi_sim)
                        (default: eng)
  --asr-engine {whisper}
                        ASR engine for audio files (default: whisper)
  --model-size {tiny,base,small,medium,large-v3}
                        Whisper model size for ASR (default: tiny)
  --config CONFIG       Path to config file (default: config/default.yaml;
                        opp_config.yaml also accepted with deprecation
                        warning)
  --no-cache            Skip the .omni_cache/ cache check (force a fresh
                        extraction)
  --clear-cache         Remove all cached OPP outputs and exit
  --max-file-size, --max-file-size-mb MAX_FILE_SIZE
                        Reject files larger than this size in MB (default: no
                        limit)
  --log-format {console,json}
                        Log output format (default: console). Also
                        configurable via OMNI_LOG_FORMAT env var.
  --load-dotenv         Load .env file before running (opt-in)
  --capabilities        Print OPP module capabilities (input formats, output
                        formats, available tools) and exit
  --validate-xliff      Validate an XLIFF 1.2 file (schema + trans-unit
                        content rules) and exit. Uses --xliff-content (inline)
                        if provided, otherwise --xliff-file.
  --xliff-content XLIFF_CONTENT
                        Inline XLIFF XML string. Used with --validate-xliff
                        (takes precedence over --xliff-file).
  --xliff-file XLIFF_FILE
                        Path to .xlf/.xliff file. Used with --validate-xliff
                        (when --xliff-content is not set).

Examples: opp file.docx Extract from a single file opp folder/ Process folder
(batch mode) opp --detect-format file.docx Auto-detect format and extract opp
--resource-dir ./output file.docx Extract and save resources to ./output opp
--target-format md --output-dir ./out file.html Generate markdown output opp
--target-format xlf --source-lang en --target-lang fr file.epub Generate XLIFF
opp --ocr-engine tesseract --ocr-lang eng file.png OCR with Tesseract
(English) opp --ocr-engine rapidocr file.jpg OCR with RapidOCR
