Skip to content
Back to skills

Aio Epub Export

ASecurity

Pack a translated EPUB into a downloadable file — bilingual (original + translation side-by-side) or translation-only output. Use when the user wants to export/xuất sách, đóng gói sách, generate an EPUB file, download a finished book, or send a translation to Kindle.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 20, 2026
ai-agentspythonapi

Works with

  • api

Security analysis

A100/100

Scanned November 20, 2026

npx -y skills add aiocean/claude-plugins --skill aio-epub-export --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aio Epub Export?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aio Epub Export
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiocean-aio-epub-export/badge)](https://www.skillsdirectory.com/skills/aiocean-aio-epub-export)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aio-epub-export
description: |
  Pack a translated EPUB into a downloadable file — bilingual (original + translation side-by-side) or translation-only output. Use when the user wants to export/xuất sách, đóng gói sách, generate an EPUB file, download a finished book, or send a translation to Kindle.
when_to_use: export epub, xuất sách, pack epub, đóng gói sách, download epub, tải sách, send to kindle, bilingual export, generate epub file
effort: low
argument-hint: book ID
---

# EPUB Export — Pack & Download

Pack translated books back into EPUB format for reading or distribution.

> **Trước khi xuất**: Chạy `aio-epub-quality` để kiểm tra chất lượng. Chapters chưa dịch xong? Dùng `aio-epub-translate`.

## API Setup

```python
import json, urllib.request, os

BASE = "https://read-api.aiocean.dev/ListBooks.v1.BookService"
KEY = os.environ.get("AIO_EPUB_API_KEY", "")

def api(method, body):
    data = json.dumps(body).encode('utf-8')
    req = urllib.request.Request(f"{BASE}/{method}", data=data, headers={
        "Content-Type": "application/json",
        "X-License-Key": KEY
    })
    with urllib.request.urlopen(req) as resp:
        return json.loads(resp.read())
```

## Workflow

### 1. Check Translation Status First

```python
progress = api("GetTranslationProgress", {"bookId": BOOK_ID})
pct = progress["progress"]["translationPercentage"]
print(f"Translation progress: {pct:.1f}%")

if pct < 100:
    untranslated = []
    for fp in progress["progress"].get("fileProgress", []):
        if fp["translationPercentage"] < 100:
            untranslated.append(f"  {fp['filePath']}: {fp['translationPercentage']:.0f}%")
    print(f"\nWarning: {len(untranslated)} chapters incomplete:")
    print("\n".join(untranslated))
```

### 2. Pack EPUB

```python
# Bilingual (original + translation side by side)
result = api("PackEpub", {
    "bookId": BOOK_ID,
    "packMode": "BILINGUAL"
})
print(f"EPUB URL: {result['epubUrl']}")
print(f"Message: {result['message']}")

# Translation only (remove original text)
result = api("PackEpub", {
    "bookId": BOOK_ID,
    "packMode": "TRANSLATION_ONLY",
    "stripMarkers": True  # remove data-* attributes for clean output
})
print(f"EPUB URL: {result['epubUrl']}")
```

### 3. Send to Kindle

```python
result = api("SendToKindle", {
    "bookId": BOOK_ID,
    "name": "My Book",
    "email": "your-kindle@kindle.com"
})
print(result["message"])
```

## Pack Modes

| Mode | Description | Use Case |
|------|-------------|----------|
| `BILINGUAL` | Original + translation paragraphs | Learning, reference |
| `TRANSLATION_ONLY` | Only translated text | Reading, distribution |

### Strip Markers Option

When `stripMarkers: true` with `TRANSLATION_ONLY` mode:
- Removes all `data-content-id`, `data-translation-id`, `data-translation-by-id` attributes
- Produces clean HTML suitable for publishing
- Recommended for final export

## Điều hướng

| Tình huống | Dùng skill |
|-----------|------------|
| Có chapters chưa dịch | `aio-epub-translate` |
| Muốn kiểm tra chất lượng trước khi xuất | `aio-epub-quality` |
| Xem tiến độ tổng thể | `aio-epub-manage` |
| Upload sách mới | `aio-epub-upload` |

**Workflow**: `aio-epub-setup` → `aio-epub-upload` → `aio-epub-translate` → `aio-epub-quality` → **`aio-epub-export`**

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.