Repository navigation
Releases
Markdown OCR Cleaner 0.1.0
First alpha release of Markdown OCR Cleaner, a conservative command-line tool for cleaning OCR-produced Markdown and plain-text documents.
Highlights
Conservative Markdown segmentation that protects code, tables, HTML, links, front matter, footnotes, math blocks, and explicitly escaped regions.
Three safe cleanup rules enabled by default:
trailing whitespace cleanup;
repeated-space cleanup in prose;
excessive blank-line cleanup.
Two detect-only rules for suspicious characters and probable page numbers.
Three optional destructive rules:
page-number removal;
line-end hyphen joining;
paragraph reconstruction.
Dry-run, unified diff, check mode, JSON reports, and fail-on-warning support.
UTF-8, UTF-8 with BOM, CP1250, and ISO-8859-2 input handling.
Atomic and overwrite-safe output, optional backups, and protected-content enforcement.
No runtime dependencies, telemetry, network access, or subprocess execution.
Compatibility
Tested with:
Python 3.11, 3.12, and 3.13
Ubuntu 24.04
Windows
The complete release test matrix and distribution build passed on the tagged v0.1.0 commit.
Installation
The package is not currently published on PyPI. Download the wheel attached below and install it with:
python -m pip install markdown_ocr_cleaner-0.1.0-py3-none-any.whl
The source distribution is also attached for source-based installation and inspection.
Important notes
Markdown OCR Cleaner preserves and processes Unicode text in any language. Its dictionary-free cleanup heuristics are conservative and are not guaranteed to be linguistically accurate for every language or writing system.
Destructive rules are disabled by default. Review their output with --dry-run --diff before writing changes.