ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified file management Safety 5/5

txt-to-epub

将txt文本转换为epub文件,使用纯规则进行章节识别与分割。适用于小说、教程和一般长文,不内置AI接口。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/1oid/txt-to-epub
Or

What This Skill Does

The txt-to-epub skill is a powerful, locally-run utility designed to convert plain text (.txt) files into structured EPUB digital books. It relies on deterministic, rule-based algorithms for chapter identification and file splitting rather than AI generation, making it highly efficient for processing large literary works, technical documentation, or long-form articles. By automating the extraction of chapter titles based on common formatting patterns—such as "Chapter X," "第一章," or numerical segments like "1.2.3"—this tool creates professional-grade EPUBs complete with nested table-of-contents navigation. It is specifically optimized to handle encoding detection automatically, ensuring that various character sets are processed correctly without manual intervention.

Installation

To integrate this skill into your OpenClaw environment, use the command-line interface provided by the platform. Ensure your environment has Python 3 installed, as the skill executes a dedicated Python script located at /Users/loid/.claude/skills/txt-to-epub/scripts/txt_to_epub.py. Run the following command in your terminal:

clawhub install openclaw/skills/skills/1oid/txt-to-epub

After installation, verify your Python dependencies by running: python3 -m pip install -r /Users/loid/.claude/skills/txt-to-epub/requirements.txt

Use Cases

  1. Digital Archiving: Convert downloaded web articles or project documentation into a portable e-reader format for offline reading.
  2. Novelist Workflow: Take raw draft files and instantly turn them into structured books for proofreading on devices like Kindle or Kobo.
  3. Educational Material: Organize complex multi-part tutorials into distinct, navigable chapters by utilizing the tutorial split mode.
  4. Batch Processing: Manage long-form content that exceeds typical note-taking app limits by converting them into manageable, chapter-based EPUB files.

Example Prompts

  1. "Hey OpenClaw, please convert the file /Documents/my_novel.txt into an EPUB. Use the novel split mode, set the title to 'My Great Novel', and keep the author field as 'Loid'."
  2. "I have a long technical tutorial at /Downloads/guide.txt. Can you use the tutorial split mode to turn it into an EPUB? Please make sure the output file is saved in my desktop folder."
  3. "Convert /Work/project_notes.txt to an EPUB file. Use auto-detection for the chapters and please clean up the title formatting so the TOC looks clean."

Tips & Limitations

For the best results, ensure your source text follows a consistent structure. If the tool struggles to identify chapters, the auto mode or adjusting the --chunk-chars parameter can help mitigate issues with unconventional formatting. Note that this skill performs purely local processing and does not interact with AI APIs, meaning it is exceptionally private but cannot "understand" or "summarize" the content. If your document uses custom separators not covered by the standard rules, you may need to perform some minor pre-processing on the TXT file before conversion.

Metadata

Author@1oid
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-1oid-txt-to-epub": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#epub#conversion#ebook#productivity#automation
Safety Score: 5/5

Flags: file-write, file-read, code-execution