How teechinyean/pdf_translate-for-manga- works
This is a local manga/PDF translation and redraw application, with a web backend coordinating page processing and downloads. The principal workflow is PDF upload, page extraction and text recognition, translation, removal of original lettering, Chinese typesetting, then PDF/image output; progress and previews support the user along the way. The README documents the detector, OCR, and export capabilities, while sampled code confirms the async pipeline, translation engine, and rendering responsibilities. Some internal wiring and unsampled feature implementations are represented only where the README supports them.
Main entry points: pipeline.py Async pipeline · extractor.py Page extraction · main.py Web backend · engine.py Translation engine
Components 15
Web workflow
- Web backend
pdf_translate/main.py - Async pipeline
pdf_translate/core/pipeline.py - Progress and preview
pdf_translate/main.py
Page processing
- Page extraction
pdf_translate/core/extractor.py - Text detection
pdf_translate/manga_translator_source/manga-image-translator-main/manga_translator/detection - Japanese OCR
pdf_translate/manga_translator_source/manga-image-translator-main/manga_translator/ocr - Text organization
pdf_translate/manga_translator_source/manga-image-translator-main/manga_translator/textline_merge
Text translation
- Translation engine
pdf_translate/core/engine.py - Translation providers
pdf_translate/manga_translator_source/manga-image-translator-main/manga_translator/translators - Series glossary
pdf_translate/core/engine.py
Image output
- Text removal
pdf_translate/core/renderer.py - LaMa worker
pdf_translate/core/lama_worker.py - Chinese typesetting
pdf_translate/core/renderer.py - PDF and images
pdf_translate/core/renderer.py
Other components
- Reader
Connections 16
- Reader → Web backend: uploads PDF
- Web backend → Async pipeline: starts task
- Async pipeline → Page extraction: extracts pages
- Page extraction → Text detection: finds text regions
- Page extraction → Japanese OCR: recognizes text
- Page extraction → Text organization: organizes lines
- Async pipeline → Translation engine: translates blocks
- Translation engine → Translation providers: uses provider
- Translation engine → Series glossary: extracts terms
- Async pipeline → Text removal: redraws pages
- Text removal → LaMa worker: requests repair
- Async pipeline → Chinese typesetting: lays out translations
- Async pipeline → PDF and images: exports results
- Web backend → Progress and preview: reports progress
- Progress and preview → Reader: shows status
- PDF and images → Reader: provides downloads