Yomitan-scannable OCR overlays for manga in Suwayomi + Anki image export
JavaScript
4
472 commits
updated Oct 5, 2026
Mangatan is a language-learning tool that creates Yomitan-scannable text overlays directly on top of manga served by Suwayomi.
⚠️ Important Notice for Updates
If you are updating from an earlier version or encounter unexpected issues, please re-clone the repository fresh (
git clone) rather than pulling or manually copying files over. This ensures all server backends, package configurations, and userscript assets remain cleanly synchronized.
💡 Looking for a Simpler Setup?
For a streamlined application for reading and mining manga, anime, and novels on multiple platforms, check out: Manatan or Mangatan (Mangayomi fork)
https://github.com/user-attachments/assets/b7649677-3453-4bca-8898-56761141bc31
To ensure dictionary lookups parse smoothly across line breaks and mining works correctly, adjust these settings in Yomitan:
\n with nothing.\s with nothing.Text Parsing > Sentence termination characters and change it to "Custom, no new lines" to prevent mined sentences from being cut short at line breaks.To enable compatibility with the Jiten Reader extension, configure the following settings:
Add the following JSON configuration under Parsing -> Extra Meta:
[
{
"host": "*://127.0.0.1:4567/manga/*",
"auto": true,
"allFrames": true,
"parserClass": "manga-ocr-parser",
"parseVisibleObserver": true,
"addedObserver": {
"observeFrom": "body",
"checkNested": ".gemini-ocr-decoupled-overlay",
"notifyFor": ".gemini-ocr-text-box"
}
}
]
Add the following styles under Appearance -> Advanced CSS Overrides -> Custom Word CSS:
/* 1. Permanent layout: kept 'block' at all times to prevent hover reflow/jitter */
.manga-ocr-parser .gemini-ocr-text-box {
display: block !important;
pointer-events: auto !important;
user-select: text !important;
cursor: text;
}
/* 2. Instant opacity toggle */
.manga-ocr-parser .gemini-ocr-text-box:not(:hover):not(.manual-highlight) {
opacity: 0 !important;
}
.manga-ocr-parser .gemini-ocr-text-box:hover,
.manga-ocr-parser .gemini-ocr-text-box.manual-highlight {
opacity: 1 !important;
z-index: 9999 !important;
background: #ffffff !important;
}
/* 3. Static vertical typography with heavy Manga Gothic */
.manga-ocr-parser .gemini-ocr-text-vertical {
writing-mode: vertical-rl !important;
-webkit-writing-mode: vertical-rl !important;
text-orientation: mixed !important;
/* Punchy Manga Gothic stack (strictly non-serif) */
font-family:
"Hiragino Maru Gothic ProN", /* macOS: Gorgeous built-in rounded manga gothic */
"BIZ UDPGothic", /* Windows 10/11: Morisawa universal-design gothic (thick, highly legible) */
"Yu Gothic UI", /* Windows: UI variant (avoids the thin/spindly regular Yu Gothic bug) */
"Meiryo", /* Windows: Solid, heavy strokes */
"Hiragino Sans", /* macOS: Standard bold gothic fallback */
sans-serif !important;
/* Crucial: Manga bubbles require heavy weight to look authentic and readable */
font-weight: 700 !important;
line-height: 1.25 !important;
color: #000000 !important;
}
/* 4. Force question marks, exclamation marks, and Jiten words upright */
.manga-ocr-parser .gemini-ocr-text-vertical .jiten-word {
text-orientation: upright !important;
}
All engines automatically download their necessary model weights from Hugging Face on their first run.
PP-OCRv6 Manga (Recommended):
Manga-OCR DirectML (Fast Local GPU):
Manga-OCR Torch (Local CPU):
Google Lens (Online / Cloud):
Tall vertical webtoon strips are automatically detected by aspect ratio and processed through an intelligent sliding window with boundary overlap deduplication, preventing split speech bubbles across all backends.
Ctrl to merge, Alt to delete) or use the mobile FAB menu to adjust box layouts.Before configuring your background OCR server, set up the frontend:
This option uses uv (a fast Python package manager) to install dependencies and run the background OCR server.
uv on your system.ocr-server folder, and launch your chosen processing engine:| Processing Engine | Host System Requirements | Launch Command |
|---|---|---|
| Google Lens (Online) | Active Internet Connection | uv run server.py -e=googlelens (or uv run server.py) |
| PP-OCRv6 Manga (Recommended-Fast) | Windows GPU (DirectML) or CPU | uv run server.py -e=ppocrv6manga |
| Manga-OCR DirectML (Fast GPU) | Windows GPU (NVIDIA, AMD, Intel) | uv run server.py -e=mangaocrdirectml |
| Manga-OCR (CPU Torch) | Standard CPU | uv run server.py -e=mangaocr |
Use this if you prefer running the background Google Lens OCR process via Node.js.
ocr-server-legacy directory and install the modules:
npm ci
node server.js
(Windows users can also double-click Runme.bat)Use this if you prefer running local OCR (OneOCR) utilizing native Python packages.
ocr-server-legacy directory and run:
pip install oneocr waitress flask aiohttp Pillow "Flask[async]"
python local_server.py
(Or launch runme(local-server).bat on Windows)http://127.0.0.1:3000.⚠️ Mobile Recommendation Disclaimer
Setting up Node, Java, and background server processes inside Termux is complex, prone to performance issues, and resource-heavy on mobile hardware. If you are looking for a high-quality mobile reading experience, utilizing dedicated native apps is strongly recommended over this manual local server workflow:
- For Android: Use Chimahon (a specialized Mihon/Komikku immersion fork with native Yomitan dictionary lookup, Mokuro support, novel EPUB reader, and instant card mining).
- For Android & iOS: Use Manatan (the streamlined, cross-platform application for reading and language immersion on all platforms).
If you still prefer to host the background server and browser overlay setup manually on mobile, you can use the instructions below.
Runs both Suwayomi-Server and the background OCR server directly on your mobile device.
Recommended Browsers: Firefox or Edge Canary. Install Tampermonkey in the browser and add the userscript.
pkg update -y && pkg install -y openjdk-21 wget jq libandroid-posix-semaphore && mkdir -p ~/suwayomi/bin && LATEST_JAR_URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | jq -r '.assets[] | select(.name | endswith(".jar")) | .browser_download_url') && wget -O ~/suwayomi/SuwayomiServer.jar "$LATEST_JAR_URL" && echo -e '#!/data/data/com.termux/files/usr/bin/bash\njava -jar ~/suwayomi/SuwayomiServer.jar' > ~/suwayomi/bin/suwayomi && chmod +x ~/suwayomi/bin/suwayomi && echo 'export PATH="$HOME/suwayomi/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
rm -rf ~/Mangatan && pkg install -y git nodejs && git clone https://github.com/kaihouguide/Mangatan && cd Mangatan/ocr-server-legacy && npm install express chrome-lens-ocr multer node-fetch --force && mkdir -p ~/bin && echo -e '#!/data/data/com.termux/files/usr/bin/sh\ncd ~/Mangatan/ocr-server-legacy && node server.js' > ~/bin/mangatan && chmod +x ~/bin/mangatan && echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
npm install --cpu=wasm32 sharp --force
npm install @img/sharp-wasm32 --force
rm -rf node_modules package-lock.json
npm install --force
suwayomi in Termux Session 1.mangatan in Termux Session 2.http://127.0.0.1:4567.This allows hosting both Suwayomi-Server and the OCR Server on a powerful desktop while reading on a tablet or phone over your home Wi-Fi network.
server.conf directory:
%LOCALAPPDATA%/Tachidesk~/.local/share/Tachidesk~/Library/Application Support/Tachideskserver.conf and change server.ip to match your desktop's local network IP address (e.g., 192.168.1.50).uv run server.py --ip <your_desktop_ip>
127.0.0.1 or localhost with your desktop's local IP address.You can use NSSM (Non-Sucking Service Manager) to run both utilities in the background as services. Configure them using these batch file templates:
suwayomi_start.bat):
@echo off
cd /d "<path-to-suwayomi-server-folder>"
"<path-to-suwayomi-server-folder>\jre\bin\java.exe" -jar "<path-to-suwayomi-server-folder>\bin\Suwayomi-Server.jar"
ocr_start.bat):
@echo off
cd /d "<path-to-mangatan-ocr-server-folder>"
uv run server.py -e=ppocrv6manga --ip <your-ip-address> --port <your-port>
ocr-cache.json in its root folder to store OCR results and manual box edits across reader sessions.Yomitan-scannable OCR overlays for manga in Suwayomi + Anki image export
JavaScript
4
472 commits
updated Oct 5, 2026
Mangatan is a language-learning tool that creates Yomitan-scannable text overlays directly on top of manga served by Suwayomi.
⚠️ Important Notice for Updates
If you are updating from an earlier version or encounter unexpected issues, please re-clone the repository fresh (
git clone) rather than pulling or manually copying files over. This ensures all server backends, package configurations, and userscript assets remain cleanly synchronized.
💡 Looking for a Simpler Setup?
For a streamlined application for reading and mining manga, anime, and novels on multiple platforms, check out: Manatan or Mangatan (Mangayomi fork)
https://github.com/user-attachments/assets/b7649677-3453-4bca-8898-56761141bc31
To ensure dictionary lookups parse smoothly across line breaks and mining works correctly, adjust these settings in Yomitan:
\n with nothing.\s with nothing.Text Parsing > Sentence termination characters and change it to "Custom, no new lines" to prevent mined sentences from being cut short at line breaks.To enable compatibility with the Jiten Reader extension, configure the following settings:
Add the following JSON configuration under Parsing -> Extra Meta:
[
{
"host": "*://127.0.0.1:4567/manga/*",
"auto": true,
"allFrames": true,
"parserClass": "manga-ocr-parser",
"parseVisibleObserver": true,
"addedObserver": {
"observeFrom": "body",
"checkNested": ".gemini-ocr-decoupled-overlay",
"notifyFor": ".gemini-ocr-text-box"
}
}
]
Add the following styles under Appearance -> Advanced CSS Overrides -> Custom Word CSS:
/* 1. Permanent layout: kept 'block' at all times to prevent hover reflow/jitter */
.manga-ocr-parser .gemini-ocr-text-box {
display: block !important;
pointer-events: auto !important;
user-select: text !important;
cursor: text;
}
/* 2. Instant opacity toggle */
.manga-ocr-parser .gemini-ocr-text-box:not(:hover):not(.manual-highlight) {
opacity: 0 !important;
}
.manga-ocr-parser .gemini-ocr-text-box:hover,
.manga-ocr-parser .gemini-ocr-text-box.manual-highlight {
opacity: 1 !important;
z-index: 9999 !important;
background: #ffffff !important;
}
/* 3. Static vertical typography with heavy Manga Gothic */
.manga-ocr-parser .gemini-ocr-text-vertical {
writing-mode: vertical-rl !important;
-webkit-writing-mode: vertical-rl !important;
text-orientation: mixed !important;
/* Punchy Manga Gothic stack (strictly non-serif) */
font-family:
"Hiragino Maru Gothic ProN", /* macOS: Gorgeous built-in rounded manga gothic */
"BIZ UDPGothic", /* Windows 10/11: Morisawa universal-design gothic (thick, highly legible) */
"Yu Gothic UI", /* Windows: UI variant (avoids the thin/spindly regular Yu Gothic bug) */
"Meiryo", /* Windows: Solid, heavy strokes */
"Hiragino Sans", /* macOS: Standard bold gothic fallback */
sans-serif !important;
/* Crucial: Manga bubbles require heavy weight to look authentic and readable */
font-weight: 700 !important;
line-height: 1.25 !important;
color: #000000 !important;
}
/* 4. Force question marks, exclamation marks, and Jiten words upright */
.manga-ocr-parser .gemini-ocr-text-vertical .jiten-word {
text-orientation: upright !important;
}
All engines automatically download their necessary model weights from Hugging Face on their first run.
PP-OCRv6 Manga (Recommended):
Manga-OCR DirectML (Fast Local GPU):
Manga-OCR Torch (Local CPU):
Google Lens (Online / Cloud):
Tall vertical webtoon strips are automatically detected by aspect ratio and processed through an intelligent sliding window with boundary overlap deduplication, preventing split speech bubbles across all backends.
Ctrl to merge, Alt to delete) or use the mobile FAB menu to adjust box layouts.Before configuring your background OCR server, set up the frontend:
This option uses uv (a fast Python package manager) to install dependencies and run the background OCR server.
uv on your system.ocr-server folder, and launch your chosen processing engine:| Processing Engine | Host System Requirements | Launch Command |
|---|---|---|
| Google Lens (Online) | Active Internet Connection | uv run server.py -e=googlelens (or uv run server.py) |
| PP-OCRv6 Manga (Recommended-Fast) | Windows GPU (DirectML) or CPU | uv run server.py -e=ppocrv6manga |
| Manga-OCR DirectML (Fast GPU) | Windows GPU (NVIDIA, AMD, Intel) | uv run server.py -e=mangaocrdirectml |
| Manga-OCR (CPU Torch) | Standard CPU | uv run server.py -e=mangaocr |
Use this if you prefer running the background Google Lens OCR process via Node.js.
ocr-server-legacy directory and install the modules:
npm ci
node server.js
(Windows users can also double-click Runme.bat)Use this if you prefer running local OCR (OneOCR) utilizing native Python packages.
ocr-server-legacy directory and run:
pip install oneocr waitress flask aiohttp Pillow "Flask[async]"
python local_server.py
(Or launch runme(local-server).bat on Windows)http://127.0.0.1:3000.⚠️ Mobile Recommendation Disclaimer
Setting up Node, Java, and background server processes inside Termux is complex, prone to performance issues, and resource-heavy on mobile hardware. If you are looking for a high-quality mobile reading experience, utilizing dedicated native apps is strongly recommended over this manual local server workflow:
- For Android: Use Chimahon (a specialized Mihon/Komikku immersion fork with native Yomitan dictionary lookup, Mokuro support, novel EPUB reader, and instant card mining).
- For Android & iOS: Use Manatan (the streamlined, cross-platform application for reading and language immersion on all platforms).
If you still prefer to host the background server and browser overlay setup manually on mobile, you can use the instructions below.
Runs both Suwayomi-Server and the background OCR server directly on your mobile device.
Recommended Browsers: Firefox or Edge Canary. Install Tampermonkey in the browser and add the userscript.
pkg update -y && pkg install -y openjdk-21 wget jq libandroid-posix-semaphore && mkdir -p ~/suwayomi/bin && LATEST_JAR_URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | jq -r '.assets[] | select(.name | endswith(".jar")) | .browser_download_url') && wget -O ~/suwayomi/SuwayomiServer.jar "$LATEST_JAR_URL" && echo -e '#!/data/data/com.termux/files/usr/bin/bash\njava -jar ~/suwayomi/SuwayomiServer.jar' > ~/suwayomi/bin/suwayomi && chmod +x ~/suwayomi/bin/suwayomi && echo 'export PATH="$HOME/suwayomi/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
rm -rf ~/Mangatan && pkg install -y git nodejs && git clone https://github.com/kaihouguide/Mangatan && cd Mangatan/ocr-server-legacy && npm install express chrome-lens-ocr multer node-fetch --force && mkdir -p ~/bin && echo -e '#!/data/data/com.termux/files/usr/bin/sh\ncd ~/Mangatan/ocr-server-legacy && node server.js' > ~/bin/mangatan && chmod +x ~/bin/mangatan && echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
npm install --cpu=wasm32 sharp --force
npm install @img/sharp-wasm32 --force
rm -rf node_modules package-lock.json
npm install --force
suwayomi in Termux Session 1.mangatan in Termux Session 2.http://127.0.0.1:4567.This allows hosting both Suwayomi-Server and the OCR Server on a powerful desktop while reading on a tablet or phone over your home Wi-Fi network.
server.conf directory:
%LOCALAPPDATA%/Tachidesk~/.local/share/Tachidesk~/Library/Application Support/Tachideskserver.conf and change server.ip to match your desktop's local network IP address (e.g., 192.168.1.50).uv run server.py --ip <your_desktop_ip>
127.0.0.1 or localhost with your desktop's local IP address.You can use NSSM (Non-Sucking Service Manager) to run both utilities in the background as services. Configure them using these batch file templates:
suwayomi_start.bat):
@echo off
cd /d "<path-to-suwayomi-server-folder>"
"<path-to-suwayomi-server-folder>\jre\bin\java.exe" -jar "<path-to-suwayomi-server-folder>\bin\Suwayomi-Server.jar"
ocr_start.bat):
@echo off
cd /d "<path-to-mangatan-ocr-server-folder>"
uv run server.py -e=ppocrv6manga --ip <your-ip-address> --port <your-port>
ocr-cache.json in its root folder to store OCR results and manual box edits across reader sessions.