How alikhaled17/puppeteer-ocr-pdf works
This is a small command-line workflow that logs into a configured book website, captures book pages as images, then OCRs and merges them into a searchable PDF. The browser and OCR stages are implemented in two files; the graph preserves that handoff. The README describes the setup and dependencies, while the sampled source shows the runtime calls and file processing.
Main entry points: index.js Capture page images · run.py OCR and page PDFs · info.json Login and book config
Components 8
Browser capture
- Login and book config
info.json - Capture page images
index.js - Captured page images
index.js
OCR conversion
- OCR and page PDFs
run.py - Searchable book PDF
run.py
Other components
- Operator
- Book website
- Tesseract OCR
Connections 8
- Operator → Login and book config: enters credentials
README.md - Capture page images → Login and book config: reads settings
index.js - Capture page images → Book website: logs in and navigates
index.js - Capture page images → Captured page images: screenshots pages
index.js - Capture page images → OCR and page PDFs: spawns with page list
index.js - OCR and page PDFs → Captured page images: reads and renames
run.py - OCR and page PDFs → Tesseract OCR: requests OCR
run.py - OCR and page PDFs → Searchable book PDF: merges and writes
run.py