epubook
v0.0.11
Published
[![version](https://img.shields.io/npm/v/epubook?color=rgb%2850%2C203%2C86%29&label=epubook)](https://www.npmjs.com/package/epubook) [![CI](https://github.com/yjl9903/epubook/actions/workflows/ci.yml/badge.svg)](https://github.com/yjl9903/epubook/actions/
Downloads
47
Maintainers
Readme
epubook
A Node EPUB 3 generation library which supports from low-level API to high-level ebook abstraction with customizable themes.
- Just use epubook in your project to generate epub easily
- @epubook/core provides low-level EPUB generation API
- @epubook/theme-default is the default theme used in epubook
- @epubook/cli generates EPUB from local configuration and markdown content
Usage
Library
npm i epubook
import { 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.
CLI
npm i -g @epubook/cli
epubook --version
epubook --help
Resources
License
MIT License © 2023 XLor