// the find
yihong0618/epubhv
Make your epub books vertical or horizontal.
A CLI (plus a bolted-on Streamlit web UI) that rewrites an epub's CSS to flip it between vertical and horizontal writing mode, with extras for CJK readers: furigana/ruby annotations, Simplified/Traditional Chinese conversion via OpenCC, and Cantonese jyutping. It's for people reading Japanese or Chinese epubs in readers that don't handle vertical text well, or language learners who want ruby glosses.
Does one annoying, specific thing that's genuinely hard to get right elsewhere - vertical-mode CSS injection for epub readers that don't support it natively. Batch mode (point it at a folder) is a nice touch for anyone converting a library at once. Pulls in real CJK tooling (OpenCC for script conversion, ToJyutping for Cantonese, a furigana generator) instead of reinventing text processing. Has CI and a test suite with real epub fixtures, not just unit stubs.
Tiny core - the whole transform logic lives in four files (epubhv.py, punctuation.py, yomituki.py, cli.py), so there's not much surface area tested against the wild variety of malformed/DRM'd epubs people actually have. README is pure usage examples with zero explanation of how the CSS/writing-mode injection works or which reading apps it's verified against (Apple Books vs. KOReader vs. Calibre render vertical-writing-mode very differently). No mention of what happens to existing styling/images when it rewrites the CSS - could clobber a book's original formatting. Audience is narrow by design (Japanese/Chinese/Cantonese readers specifically), so most subscribers would skip it, but it's a sharp niche pick for the right person.