Convert Markdown into professional EPUB ebooks with auto-generated neo-brutalism covers and embedded images. Triggers: "create ebook", "convert Markdown to EPUB", "generate EPUB", "package for offline reading", epub, kindle.
which python3 2>/dev/null || echo "NOT INSTALLED"ls -d ~/.claude/plugins/cache/aiocean-plugins/aio-epub-packing/*/skills/aio-epub-packing 2>/dev/null | sort -V | tail -1 || echo "NOT FOUND"python3 -c "import ebooklib" 2>/dev/null && echo "installed" || echo "NOT INSTALLED — run: pip3 install -r requirements.txt"EP="$(ls -d ~/.claude/plugins/cache/aiocean-plugins/aio-epub-packing/*/skills/aio-epub-packing 2>/dev/null | sort -V | tail -1)"
Convert Markdown documents into professional EPUB ebooks with auto-generated neo-brutalism covers and embedded images.
Converting a single article, document, or essay into an ebook:
# Install dependencies (first time only)
pip3 install -r requirements.txt
# Generate EPUB
python3 generate_epub.py \
--input article.md \
--output article.epub \
--title "Understanding System Design" \
--author "Engineering Team"
The tool will:
For books, guides, or documentation split across multiple files:
# Organize your chapters as separate .md files
# Example:
# chapter-01-intro.md
# chapter-02-basics.md
# chapter-03-advanced.md
# Generate EPUB (chapters processed in order)
python3 generate_epub.py \
--input chapter-01-intro.md chapter-02-basics.md chapter-03-advanced.md \
--output complete-guide.epub \
--title "Complete Guide to Python" \
--author "Your Name"
Chapter titles are automatically extracted from the first H1 (#) heading in each file.
Saving articles from the web for offline reading:
# Download and convert HTML to Markdown
python3 download_html_to_md.py https://example.com/article --output ./raw
# Clean up the markdown (AI or manual editing)
# - Remove ads, navigation, footers
# - Fix formatting issues
# - Improve structure
# Generate EPUB (automatically downloads and embeds images)
python3 generate_epub.py \
--input ./raw/article-title.md \
--output article.epub \
--title "Article Title" \
--author "Original Author"
Note:
download_html_to_md.py produces raw markdown that needs cleanup before EPUB generationControl cover colors and appearance:
# Generate EPUB with specific cover color
python3 generate_epub.py \
--input book.md \
--output book.epub \
--title "My Book" \
--author "Author" \
--color yellow \
--seed 42 # For consistent colors
# Or generate cover separately
python3 generate_cover.py \
--title "System Design" \
--top-text "Tech Interview Guide" \
--bottom-text "By Engineering Team" \
--output cover.png \
--color cyan \
--seed 42
Available colors: yellow, pink, cyan, green, orange, purple, red, random
Using seed: Same seed = same random color every time (useful for series consistency)
By default, the table of contents (NCX file) is auto-generated from your chapter files. For advanced control, you can provide a custom NCX file.
When to use custom NCX:
Create custom NCX:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>
<meta name="dtb:uid" content="urn:uuid:12345678-1234-1234-1234-123456789abc"/>
<meta name="dtb:depth" content="1"/>
<meta name="dtb:totalPageCount" content="0"/>
<meta name="dtb:maxPageNumber" content="0"/>
</head>
<docTitle><text>Book Title</text></docTitle>
<docAuthor><text>Author Name</text></docAuthor>
<navMap>
<navPoint id="navPoint-1" playOrder="1">
<navLabel><text>Introduction</text></navLabel>
<content src="chapter_01.xhtml"/>
</navPoint>
<navPoint id="navPoint-2" playOrder="2">
<navLabel><text>Getting Started</text></navLabel>
<content src="chapter_02.xhtml"/>
</navPoint>
<!-- Add more chapters... -->
</navMap>
</ncx>
NCX Requirements:
dtb:uid must contain a valid UUID (generate with python3 -c "import uuid; print(uuid.uuid4())")playOrder must be sequential: 1, 2, 3, 4...chapter_01.xhtml, chapter_02.xhtml, etc.navPoint id must be uniqueUse custom NCX:
python3 generate_epub.py \
--input ch01.md ch02.md ch03.md \
--ncx toc.ncx \
--output book.epub \
--title "Book Title" \
--author "Author Name"
The tool will validate your NCX and warn you about any issues.
EPUB Generation:
python3 generate_epub.py \
--input file1.md file2.md # Input Markdown files
--output book.epub # Output EPUB file
--title "Book Title" # Book title
--author "Author Name" # Author name
--ncx toc.ncx # (Optional) Custom NCX file
--language en # Language code (default: en)
--publisher "Publisher Name" # Publisher (optional)
--color cyan # Cover color scheme
--seed 42 # Random seed for colors
--top-text "Series Name" # Cover top text
--bottom-text "Subtitle" # Cover bottom text
Cover-Only Generation:
python3 generate_epub.py \
--cover-only \
--title "Title" \
--author "Author" \
--output cover.png \
--color yellow \
--seed 42 \
--top-text "Category" \
--bottom-text "Subtitle"
Standalone Cover Generator:
python3 generate_cover.py \
--title "Book Title" \
--output cover.png \
--top-text "Series/Category" \
--bottom-text "Author/Subtitle" \
--color purple \
--seed 42 \
--width 1600 \
--height 2400
The tool supports comprehensive Markdown features:
# through ######**bold**, *italic*[text](url)> quote (auto-embedded)--- or ***Frontmatter metadata extraction:
---