obsidian2epub

Unintendedsideeffects's avatarfrom Unintendedsideeffects

Convert Obsidian vaults to EPUB ebooks. Use when the user wants to create an ebook from Obsidian notes, export a vault as EPUB, or convert markdown notes to an ebook format.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 15, 2025

When & Why to Use This Skill

Obsidian2Epub is a specialized Claude skill designed to seamlessly transform Obsidian vaults into professionally formatted EPUB ebooks. It preserves the integrity of your personal knowledge base by supporting internal wikilinks, rendering complex Mermaid diagrams into high-quality SVGs, and employing a smart HITS-based ordering algorithm to ensure a logical flow of chapters. This tool is essential for users looking to bridge the gap between markdown-based note-taking and portable digital publishing.

Use Cases

  • Personal Knowledge Management: Convert your entire Obsidian vault into an EPUB for offline reading on e-readers like Kindle, Kobo, or mobile devices.
  • Digital Publishing: Quickly turn a collection of markdown-based research notes or technical documentation into a structured ebook for distribution or professional sharing.
  • Academic Study Guides: Transform complex study notes containing diagrams and cross-references into a portable, well-ordered digital book that maintains all visual data.
  • Project Archiving: Export specific project folders or 'Map of Content' (MOC) structures into a consolidated ebook format for permanent record-keeping and easy review.
nameobsidian2epub
descriptionConvert Obsidian vaults to EPUB ebooks. Use when the user wants to create an ebook from Obsidian notes, export a vault as EPUB, or convert markdown notes to an ebook format.

Obsidian2Epub

Convert Obsidian vaults to well-structured EPUB ebooks with full support for wikilinks, attachments, and Mermaid diagrams.

Quick Start

scripts/convert.sh /path/to/vault -o output.epub

Instructions

  1. Get the vault path from the user
  2. Determine output EPUB path
  3. Ask about optional settings (title, author, theme, filters)
  4. Run the conversion using scripts/convert.sh
  5. Report any warnings (unresolved links, mermaid failures)

CLI Reference

# Basic conversion
scripts/convert.sh /path/to/vault -o book.epub

# With options
scripts/convert.sh /path/to/vault \
  -o book.epub \
  --title "Book Title" \
  --author "Author Name" \
  --moc "Index.md" \
  -d  # dark Flexoki theme

# Interactive TUI
scripts/convert.sh --tui

Options

Option Description
-o, --output Output EPUB path (required)
--title Book title (default: vault name)
--author Author name
--moc MOC file for chapter ordering
-d, --dark Dark Flexoki theme
--include Regex to include files
--exclude Regex to exclude files
--tui Launch interactive TUI

Features

  • Wikilinks: [[note]] becomes internal EPUB links
  • Mermaid: Rendered to SVG (requires npm install -g @mermaid-js/mermaid-cli)
  • Smart Ordering: HITS algorithm for chapter order
  • Flexoki Themes: Light (default) and dark

Examples

Convert with custom title:

scripts/convert.sh ~/Obsidian/MyVault -o mybook.epub --title "My Knowledge Base"

Include only specific folders:

scripts/convert.sh ~/Obsidian/MyVault -o book.epub --include "^Projects/"

Exclude drafts:

scripts/convert.sh ~/Obsidian/MyVault -o book.epub --exclude "^Drafts/"

Configuration

Set OBSIDIAN2EPUB_DIR environment variable to override the default installation path:

export OBSIDIAN2EPUB_DIR=/path/to/obsidian2epub

Troubleshooting

Mermaid not rendering: Install mermaid-cli: npm install -g @mermaid-js/mermaid-cli

Unresolved wikilinks: Links to notes not in vault are reported as warnings

Missing attachments: Ensure files exist and paths are correct in notes