A Node EPUB 3 generation library which supports from low-level API to high-level ebook abstraction with customizable themes.
- Just use epubook all-in-one library in your project to generate epub easily
- @epubook/core provides low-level EPUB abstraction API
- @epubook/xml provides XML / XHTML builder API for EPUB content
- @epubook/bundler bundles ZIP EPUB container file
- @epubook/theme is the default theme used in epubook
- @epubook/cli creates EPUB from local configuration and text / html / markdown / ...
Warning
This library is still under active development.
npm i epubookimport { Epubook } from 'epubook'
const ebook = await Epubook.create({
title: 'title',
description: 'something'
})
const cover = await ebook.cover('./assets/cover.jpg')
const main = ebook.page('chapter', { title: 'Main', content: 'Hello, World!' })
ebook.toc(cover, main)
await ebook.writeFile('./output.epub')You can see full generation demo here.
npm i -g @epubook/cli
epubook --version
epubook --helpMIT License © 2023 XLor