Epub to markdown

From jykim/claude-obsidian-skills · View interactive version

Epub to markdown is an AI agent skill from the GitHub repository jykim/claude-obsidian-skills. Convert EPUB files to well-formatted single markdown files with images extracted.

How to use this skill

Skill file

EPUB to Markdown Skill

Convert EPUB files to well-formatted single markdown files with images extracted.

Usage

python3 epub_to_markdown.py "<epub_path>" -o "<output_path>"

Features

Output Structure

output_dir/
├── book.epub           # Original file
├── book.md             # Extracted markdown
└── _files_/            # Images folder
    ├── BookTitle_cover.jpg
    ├── BookTitle_figure1.png
    └── ...

Image Prefix

Images are extracted with a book prefix derived from the title:

This prevents filename collisions when extracting multiple books to the same folder.

Output Format

---
title: {from metadata}
author: {from metadata}
language: {from metadata}
source_file: original.epub
source_type: epub
extracted: YYYY-MM-DD HH:MM:SS
status: extracted
---

# {Book Title}

## Table of Contents
- Chapter 1
- Chapter 2
...

---

## Chapter 1

{content with ![alt](_files_/BookTitle_image.png) links}

---

## Chapter 2

{content}

Dependencies

pip install ebooklib beautifulsoup4 html2text

Or use requirements.txt:

pip install -r requirements.txt

Options

| Flag | Description |

|------|-------------|

| -o, --output | Output markdown file path (default: same as epub with .md) |

| -q, --quiet | Suppress progress messages |

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.