epub-chinese-cleaner
8
总安装量
8
周安装量
#34561
全站排名
安装命令
npx skills add https://github.com/william-yeh/epub-chinese-cleaner --skill epub-chinese-cleaner
Agent 安装分布
claude-code
8
github-copilot
8
codex
8
kimi-cli
8
gemini-cli
8
cursor
8
Skill 文档
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
Run the conversion script:
python3 scripts/convert_horizontal.py <input.epub> [-o output.epub]
If no -o is specified, output is <input>_horizontal.epub.
The script automatically:
- Tries Calibre CLI (TradSimpChinese plugin) if available at standard paths
- Falls back to direct epub manipulation if Calibre is not installed
- Skips conversion if the epub is already horizontal
Example
python3 scripts/convert_horizontal.py ä¸é«.epub
Output: ä¸é«_horizontal.epub
Self-test
python3 scripts/convert_horizontal.py --self-test
Creates a test epub with vertical layout, converts it, and verifies the output.
Punctuation mapping
See references/punctuation-map.md for the full vertical â horizontal punctuation mapping.