Use when a user has a Chinese epub with vertical text direction or right-to-left page progression and wants to convert it to standard horizontal reading. Converts from vertical layout (直排) to horizontal layout (橫排) with punctuation normalization and left-to-right page flow.
Install
npx skillscat add william-yeh/epub-chinese-cleaner Install via the SkillsCat registry.
SKILL.md
epub-chinese-cleaner
Converts Chinese epub files from vertical (直排) + RTL page flow to horizontal (橫排) + LTR page flow.
What it does
- Detects whether the epub needs conversion (checks CSS
writing-modeand OPFpage-progression-direction) - Converts writing mode from
vertical-rltohorizontal-tb(including vendor prefixes) - Normalizes punctuation from vertical Unicode forms to horizontal equivalents
- Fixes page direction by removing
page-progression-direction="rtl"from OPF spine - Preserves original — outputs a new file with
_horizontalsuffix
Usage
Ask the agent to convert an epub by name or description:
- "Convert
三體.epubto horizontal layout" - "This epub has vertical text, can you make it horizontal?"
- "Check if
book.epubneeds conversion"
The agent runs:
python3 scripts/convert_horizontal.py <input.epub>Output is <input>_horizontal.epub. The script auto-detects whether conversion is needed and picks the best method (Calibre if available, direct manipulation otherwise).
Punctuation mapping
See references/punctuation-map.md for the full vertical → horizontal punctuation mapping.