Skip to content

Unayung/mandarake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandarake

A manga reader for manhuagui.com with two modes:

  • Web viewer — fullscreen two-page spread, iPad support, PWA
  • TUI reader — terminal reader using the Kitty graphics protocol (Ghostty / kitty)

Setup

pip install flask playwright requests pillow
playwright install chromium

Web Viewer

python3 viewer.py
# or open a specific chapter directly:
python3 viewer.py https://m.manhuagui.com/comic/46693/669911.html

Open http://localhost:8080 in your browser or http://<local-ip>:8080 on iPad (same WiFi).

Controls:

Action Keyboard Touch
Next page Space / Swipe right
Prev page Swipe left
Jump to page G Tap the page counter
Toggle UI F Double-tap
Toggle spread S or click ⊞ button
Shift spread pairing X or click ⇄ button

iPad: Add to Home Screen for true fullscreen (PWA).

TUI Reader

Requires a terminal with the Kitty graphics protocol — Ghostty or kitty.

python3 tui.py https://m.manhuagui.com/comic/46693/669911.html

Controls:

Action Key
Next page Space / / l
Prev page / h
Toggle spread s
Jump to page g
Chapter list c
Quit q

In the chapter list (c): d / x downloads the highlighted chapter, a downloads every chapter. Run python3 tui.py with no URL to browse downloaded comics offline.

Download & Offline Reading

Chapters can be saved to disk for offline reading. Images go into a human-readable folder tree:

~/Manga/<book>/<chapter>/001.webp, 002.webp, …, meta.json

Set the MANGA_DIR environment variable to change the location. Downloads are resumable — already-saved pages are skipped on a re-run.

Downloaded-first: opening any chapter — by URL or via prev/next — checks the library first. If it has been downloaded, it loads straight from disk (instant, no scraping, works with no internet); otherwise it falls back to scraping the site online. So you don't need the Library list to get the offline copy — a downloaded chapter just opens offline by its normal URL.

Web viewer: open the chapter panel (☰ Chapters) — click next to any chapter to save it, or ⬇ Download all chapters. ⬇ Save in the top bar saves the chapter you're reading. Live progress shows as a percentage on the chapter row itself (47%); already-saved chapters carry a persistent . Downloaded comics also appear on the landing page, click one to read it offline.

When reading a downloaded chapter, 🌐 View online in the top bar reloads the live online version for that page (downloaded-first stays the default for prev/next).

TUI: in the chapter list, d / x saves a chapter and a saves all. Launch python3 tui.py with no URL to pick from the offline library.

Image Cache

Both modes share a disk cache at ~/.cache/manga-viewer/. Images are fetched once and served locally on repeat visits. This is separate from the ~/Manga/ download library above.

About

Manga reader for manhuagui.com — web viewer + Ghostty TUI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors