← 返回 Skills 市场
johnzhaoxiao

一个万无一失的EPUB繁简转换技能,可以将繁体中文电子书转换为简体中文,或反向转换。

作者 zhaojiaqi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
243
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install epub-converter
功能描述
Convert EPUB ebooks between Traditional and Simplified Chinese with metadata and TOC fixed; supports both directions and outputs a new EPUB file.
使用说明 (SKILL.md)

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:

  1. Auto-installs dependencies - Creates a virtual environment at ~/.openclaw/epub_venv and installs ebooklib and opencc-python-reimplemented on first run
  2. Reads EPUB structure - Parses the EPUB file using ebooklib
  3. Converts all text content - Processes all HTML/XHTML documents inside the EPUB
  4. Converts metadata - Updates book title and other metadata
  5. Fixes TOC structure - Repairs any broken table of contents entries
  6. 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.epubbook_简体.epub

Technical Details

Dependencies:

  • ebooklib - EPUB file parsing and writing
  • opencc-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:

  1. Input file is a valid EPUB (not PDF or other format)
  2. File is not DRM-protected
  3. 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.).

安全使用建议
This skill appears to do what it says: it converts EPUB text and metadata between Traditional and Simplified Chinese. Before running: (1) be aware it will create a virtual environment at ~/.openclaw/epub_venv and pip-install packages from PyPI (network access required); (2) if you prefer to review or control installs, manually create/activate a venv and pip install ebooklib and opencc-python-reimplemented before running; (3) back up originals (recommended), and avoid attempting to convert DRM-protected files; (4) you can inspect scripts/convert_epub.py and run test_skill.sh to verify behavior locally. If you need stricter supply-chain guarantees, verify package versions or install from pinned wheels/sources.
功能分析
Type: OpenClaw Skill Name: epub-converter Version: 1.0.0 The skill is a legitimate utility for converting EPUB files between Simplified and Traditional Chinese. The core logic in `scripts/convert_epub.py` uses the `ebooklib` and `opencc-python-reimplemented` libraries to process ebook content. While the script performs potentially risky actions such as creating a virtual environment and installing dependencies via `subprocess` (in `~/.openclaw/epub_venv`), these behaviors are explicitly documented in `SKILL.md` and `README.md` as part of its 'auto-install' feature. The implementation uses safe coding practices, such as list-based subprocess calls to prevent shell injection, and lacks any indicators of data exfiltration, persistence, or malicious prompt injection.
能力评估
Purpose & Capability
Name/description match the included files and behavior: scripts/convert_epub.py parses EPUBs, converts text and metadata using OpenCC and ebooklib, and writes a new EPUB. No unrelated credentials, binaries, or services are requested.
Instruction Scope
SKILL.md instructs the agent/user to run the included script and documents what is and isn't converted. Runtime instructions (create venv, install ebooklib and opencc-python-reimplemented, parse/convert EPUB files, fix TOC) are narrowly scoped to the conversion task and do not request unrelated files, credentials, or external endpoints.
Install Mechanism
There is no separate install spec; the script auto-creates a virtualenv at ~/.openclaw/epub_venv and runs pip install to fetch dependencies from PyPI at first run. This is expected for a Python utility but does perform network downloads and writes to the user's home directory. The subprocess calls are invoked safely (list form) and install common packages (ebooklib, opencc-python-reimplemented).
Credentials
The skill requests no environment variables, credentials, or config paths beyond creating/using ~/.openclaw/epub_venv. That filesystem access is proportional to the stated behavior (local venv and caches).
Persistence & Privilege
The script creates persistent files (virtualenv) under ~/.openclaw which is reasonable for convenience. always:true is not set, and the skill does not modify other skills or global agent configuration. Users should be aware of the venv left on disk.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install epub-converter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /epub-converter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of epub-converter. - Convert EPUB ebooks between Traditional and Simplified Chinese in both directions. - Automatically installs required dependencies and sets up a virtual environment. - Processes all text content and metadata within the EPUB file. - Automatically repairs common EPUB structural issues, including table of contents errors. - Customizable output file naming with automatic "_简体" or "_繁體" suffixes. - Includes troubleshooting steps for installation and conversion issues.
元数据
Slug epub-converter
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

一个万无一失的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。

💬 留言讨论