/install epub-converter
EPUB Chinese Converter
Convert EPUB ebooks between Traditional Chinese (繁體中文) and Simplified Chinese (简体中文).
Quick Start
Convert Traditional to Simplified (most common):
python3 scripts/convert_epub.py \x3Cinput.epub>
Convert Simplified to Traditional:
python3 scripts/convert_epub.py \x3Cinput.epub> --direction s2t
Specify output filename:
python3 scripts/convert_epub.py \x3Cinput.epub> -o \x3Coutput.epub>
How It Works
The script:
- Auto-installs dependencies - Creates a virtual environment at
~/.openclaw/epub_venvand installsebooklibandopencc-python-reimplementedon first run - Reads EPUB structure - Parses the EPUB file using ebooklib
- Converts all text content - Processes all HTML/XHTML documents inside the EPUB
- Converts metadata - Updates book title and other metadata
- Fixes TOC structure - Repairs any broken table of contents entries
- Saves new EPUB - Writes a properly formatted EPUB file
Conversion Directions
t2s(default): Traditional → Simplified (繁體 → 简体)s2t: Simplified → Traditional (简体 → 繁體)
Output Naming
If no output filename is specified:
- Traditional→Simplified: adds
_简体suffix - Simplified→Traditional: adds
_繁體suffix
Example: book.epub → book_简体.epub
Technical Details
Dependencies:
ebooklib- EPUB file parsing and writingopencc-python-reimplemented- Chinese text conversion
Conversion coverage:
- All HTML/XHTML content files (chapters, cover, etc.)
- Book metadata (title, author, etc.)
- Table of contents entries
Not converted:
- Image files (covers, illustrations)
- CSS stylesheets
- Binary resources
Troubleshooting
If dependencies fail to install:
# Manual installation
python3 -m venv ~/.openclaw/epub_venv
source ~/.openclaw/epub_venv/bin/activate
pip install ebooklib opencc-python-reimplemented
If EPUB structure is corrupted:
The script automatically fixes common issues:
- Missing TOC entry UIDs
- Malformed EPUB headers
- Encoding problems
If conversion fails:
Check that:
- Input file is a valid EPUB (not PDF or other format)
- File is not DRM-protected
- File size is reasonable (\x3C100MB recommended)
Examples
Basic conversion:
python3 scripts/convert_epub.py "自我升级第一原理.epub"
# Output: 自我升级第一原理_简体.epub
Custom output:
python3 scripts/convert_epub.py input.epub -o simplified_version.epub
Reverse conversion:
python3 scripts/convert_epub.py simplified.epub --direction s2t
# Output: simplified_繁體.epub
Success Indicators
When conversion succeeds, you'll see:
- ✅ Successfully read EPUB
- ✅ Successfully converted X documents
- 📝 Converted book title
- 🎉 Conversion complete!
- File size comparison
The output EPUB can be opened in any standard ebook reader (Apple Books, Calibre, etc.).
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install epub-converter - 安装完成后,直接呼叫该 Skill 的名称或使用
/epub-converter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。 是什么?
Convert EPUB ebooks between Traditional and Simplified Chinese with metadata and TOC fixed; supports both directions and outputs a new EPUB file. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 243 次。
如何安装 一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install epub-converter」即可一键安装,无需额外配置。
一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。 是免费的吗?
是的,一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。 支持哪些平台?
一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。?
由 zhaojiaqi(@johnzhaoxiao)开发并维护,当前版本 v1.0.0。