txt file convert to epub
v1.0.0将txt文本转换为epub文件,使用纯规则进行章节识别与分割。适用于小说、教程和一般长文,不内置AI接口。
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (rule-based TXT to EPUB) match the included code and requirements. The code implements encoding detection, rule-based heading detection, chapter splitting, and EPUB generation using ebooklib and chardet — exactly what the skill claims.
Instruction Scope
SKILL.md instructs the agent to collect parameters and run the local Python script on an input TXT file and return the output path and chapter preview. The instructions only reference local files and parameters needed for conversion; there are no instructions to read unrelated system files or call external endpoints.
Install Mechanism
No automated install spec is provided (instruction-only). The project includes a simple requirements.txt (ebooklib, chardet) — reasonable for EPUB creation and encoding detection. There are no remote downloads or obscure install URLs.
Credentials
The skill requires no environment variables, credentials, or config paths. All requested resources (input file, optional output path) are proportionate to the purpose.
Persistence & Privilege
always is false and the skill does not request any special agent/system privileges. It writes only the output EPUB (creating the output directory if needed) and does not modify other skills or global agent configs.
Assessment
This appears to be a straightforward, local TXT→EPUB converter. Before installing or running it: (1) review the included scripts (they are local and appear to only read the input TXT and write an .epub); (2) install dependencies from the included requirements.txt (pip install -r requirements.txt) — note SKILL.md shows an absolute user path (/Users/loid/...) which may not match your environment, so run the install from the skill directory instead; (3) verify the full script file in the bundle (the listing shown was truncated at parse_args — confirm the file is complete); and (4) run the script on non-sensitive files or in an isolated environment if you want extra caution. There are no network calls or credential requests in the code, so it does not appear to exfiltrate data.Like a lobster shell, security has layers — review code before you run it.
latest
TXT to EPUB
Role
你是一个专门将 TXT 文本转换为 EPUB 的助手。你只做规则分章,不调用任何外部模型 API。
What This Skill Does
- 自动检测 TXT 编码并读取内容
- 基于规则识别章节标题并分章
- 生成带目录导航的 EPUB 文件
- 支持保留完整标题(默认)或清理编号前缀
Split Strategy
- 支持
auto | novel | tutorial | length四种模式 - 标题规则覆盖:
- 中文小说:
第一章 .../第十回 ... - 英文结构:
Chapter 1 .../Part 2 ... - 教程编号:
1.2 .../2.3.4 ... - 中文序号:
一、...
- 中文小说:
- 当规则无法识别章节时,自动按长度切分为
Part 1/2/...
Title Handling
- 默认
--title-style full:保留完整标题- 例如输入是
第一章 xxx,目录和章节标题都保持第一章 xxx
- 例如输入是
- 可选
--title-style clean:去掉编号前缀,仅保留正文标题
Script Path
/Users/loid/.claude/skills/txt-to-epub/scripts/txt_to_epub.py
Install Dependencies
python3 -m pip install -r /Users/loid/.claude/skills/txt-to-epub/requirements.txt
Usage
最小示例:
python3 /Users/loid/.claude/skills/txt-to-epub/scripts/txt_to_epub.py \
--input /path/to/book.txt
常用示例(小说):
python3 /Users/loid/.claude/skills/txt-to-epub/scripts/txt_to_epub.py \
--input /path/to/novel.txt \
--output /path/to/novel.epub \
--title "我的小说" \
--author "作者名" \
--language zh-CN \
--split-mode novel \
--title-style full \
--verbose
常用示例(教程):
python3 /Users/loid/.claude/skills/txt-to-epub/scripts/txt_to_epub.py \
--input /path/to/tutorial.txt \
--split-mode tutorial \
--title-style full
Parameters
--input输入 TXT 文件路径(必填)--output输出 EPUB 路径(可选,默认同名.epub)--title书名(可选,默认取输入文件名)--author作者(可选)--language语言,默认zh-CN--split-mode分章模式:auto|novel|tutorial|length--title-style标题样式:full|clean,默认full--min-chapter-chars过短章节合并阈值,默认300--chunk-chars长度切分块大小,默认8000--verbose输出额外信息
Interaction Rules
当用户请求转换时:
- 收集必要参数(至少
--input) - 默认使用
--title-style full - 根据文本类型建议
--split-mode:- 小说优先
novel - 教程优先
tutorial - 不确定用
auto
- 小说优先
- 执行脚本并返回:
- 输出文件路径
- 章节数
- 前几章标题预览
Limitations
- 本技能不直接调用 AI 接口
- 复杂或非结构化文本可能需要手动指定
--split-mode或调整--chunk-chars
Comments
Loading comments...
