SuperAPI AI Directory

epub-pro-converter

Office & productivity

View repository

Updated 10-16 01:34

About this skill

EPUB Pro Converter

This skill is a technical toolbox built specifically for "publication-grade high-definition conversion". It focuses on high-quality physical conversion from EPUB to PDF and Markdown, ensuring that e-books achieve the best visual presentation on different devices.

Core Capabilities

  1. Publication-Grade PDF Reconstruction (Technical): Applies industry best practices such as 13pt font size, 1.5em line height, and 2.5cm margins. Automatically extracts and subsets embedded EPUB built-in vector fonts to ensure high-definition presentation across devices.
  2. Structured MD Extraction (Technical): Accurately restores e-book hierarchy, image references, and footnotes, generating Markdown source files suitable for note-taking systems such as Obsidian/Logseq.
  3. Ultimate Fault Tolerance and Safety: Uses MD5 filename hashing and path isolation technology to perfectly handle ultra-long paths and special characters, ensuring a 100% success rate in the conversion process.

Closed-Loop Workflow

  1. [Technical Conversion]: Run script/convert.py. This stage completes parsing of the original EPUB, font extraction, PDF rendering, and Markdown synchronization.
  2. [Quality Self-Check]: Verify the completeness of PDF pages and the correctness of Markdown image references.

Directory Structure

  • script/: Core conversion script convert.py。
  • reference/: Publication typesetting specifications typography_rules.md。
  • tools/: Dependency definitions requirements.txt。

Usage

Run the script and enter the EPUB path as prompted:

python .trae/skills/epub-pro-converter/script/convert.py

Or pass it directly via command-line arguments:

python .trae/skills/epub-pro-converter/script/convert.py "path/to/book.epub"

Applicable Scenarios

  • When the user requests "high-quality", "high-definition", or "professional typesetting" PDF conversion.
  • When the EPUB filename contains special characters or the path is extremely long.
  • When e-book content needs to be imported losslessly into Markdown note-taking tools such as Obsidian.