web-to-epub

Convert online book chapters into a portable EPUB with a table of contents.

2|Updated May 25, 2021
One-click install
npx skills add https://github.com/kang8/.dotfiles --skill web-to-epub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-to-epub
Source: https://github.com/kang8/.dotfiles/tree/main/claude/.claude/skills/web-to-epub
Command: npx skills add https://github.com/kang8/.dotfiles --skill web-to-epub

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires beautifulsoup4, and includes scripts (resource) components.

What problem does it solve?

在线书籍常常分为逐章跨站页面,难以离线阅读和整理成 EPUB。本技能将这些网页转换为一个带目录的 EPUB,自动抓取正文并按章节组织。

Core Features & Use Cases

  • 自动抓取书目结构与章节链接,生成章节顺序配置。
  • 下载并提取正文内容,去除导航与广告,保留可读文本。
  • 使用 pandoc 将整理后的章节合并为带目录的 EPUB,支持离线阅读。

Quick Start

输入一本书的 URL,工具即可自动抓取、提取正文并生成 EPUB。

Frequently Asked Questions about web-to-epub

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert online book chapters into an EPUB?

To convert web pages to EPUB, provide a book URL and the tool handles directory analysis, chapter extraction, and EPUB packaging. It fetches online book pages one by one, strips navigation, and compiles readable text into an offline EPUB.

Do I need pandoc and wget installed to scrape web pages and generate an EPUB?

Yes, you need pandoc and wget installed to use this web-to-epub conversion process. A Python environment with the BeautifulSoup library is also required for HTML parsing and content extraction from the online book pages.

Can I extract book text and remove ads automatically when generating an EPUB?

Yes, the tool automatically downloads online book pages and removes navigation and ads. It extracts only the readable text, ensuring a clean EPUB output for offline reading without website clutter.

Does this web scraping approach work with websites presenting chapters one page at a time?

Yes, this approach specifically handles websites that present book chapters one page at a time. It analyzes the directory structure, orders the chapter links, and fetches each individual webpage to compile into a single EPUB file.

What are the limitations of using Python and BeautifulSoup for web-to-epub conversion?

Using Python and BeautifulSoup for web-to-epub conversion requires a local Python environment and external tools like pandoc. It depends on the website's static HTML structure for content extraction, which may fail on heavily dynamic or JavaScript-rendered book pages.