OCRmyPDF is a mature, production-grade command-line tool and Python library that adds searchable OCR text layers to scanned PDFs, producing PDF/A-compliant output by default. The system ingests PDFs or images, optionally deskews/cleans pages via unpaper, rasterizes with Ghostscript or pypdfium2, runs Tesseract OCR, grafts the recognized text into the original PDF using a plugin-based pipeline, and performs image optimization with pngquant/jbig2enc. It supports multiple output formats (PDF/A-1b, PDF/A-2b, plain PDF), a plugin system for replacing OCR engines, rasterizers, and progress bars, and includes a directory watcher for batch processing. Architecture is a modular Python CLI/library with external subprocess orchestration; core abstractions include typed OcrOptions (pydantic), Executor concurrency, FontProvider chains, and the OcrElement data model. The codebase is exceptionally well-tested with a comprehensive suite of unit, integration, and plugin-level tests, and demonstrates advanced patterns for PDF repair, cross-platform tool discovery, and atomic file operations.
The e-invoice-eu repository is a monorepo providing a toolchain for generating EN16931-compliant electronic invoices (UBL, CII, Factur-X/ZUGFeRD, XRechnung) from spreadsheet data or JSON. It consists of a core TypeScript library, a CLI tool, a NestJS-based REST API server, and documentation. The core library implements a strategy pattern for format services, a factory for creating them, a mapping service for spreadsheet-to-invoice transformation, and validation services. The architecture is modular and well-tested, with clear separation of concerns.