Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjl9903/epubook
A Node EPUB 3 generation library
https://github.com/yjl9903/epubook
ebook ebook-generator epub epub-generation epub-generator epub3 node
Last synced: about 2 months ago
JSON representation
A Node EPUB 3 generation library
- Host: GitHub
- URL: https://github.com/yjl9903/epubook
- Owner: yjl9903
- License: mit
- Created: 2023-02-25T21:10:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T18:34:26.000Z (2 months ago)
- Last Synced: 2024-10-11T22:06:15.331Z (2 months ago)
- Topics: ebook, ebook-generator, epub, epub-generation, epub-generator, epub3, node
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/epubook
- Size: 1.07 MB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# epubook
[![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/workflows/ci.yml)
A Node [EPUB 3](https://www.w3.org/publishing/epub32/) generation library which supports from **low-level API** to **high-level ebook abstraction** with **customizable themes**.
+ Just use [epubook](https://github.com/yjl9903/epubook/tree/main/packages/epubook) in your project to generate epub easily
+ [@epubook/core](https://github.com/yjl9903/epubook/tree/main/packages/core) provides low-level EPUB generation API
+ [@epubook/theme-default](https://github.com/yjl9903/epubook/tree/main/packages/theme-default) is the default theme used in [epubook](https://github.com/yjl9903/epubook/tree/main/packages/epubook)
+ [@epubook/cli](https://github.com/yjl9903/epubook/tree/main/packages/cli) generates EPUB from local configuration and markdown content## Usage
### Library
```bash
npm i epubook
``````ts
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](https://github.com/yjl9903/epubook/blob/main/packages/epubook/test/index.test.ts).
### CLI
```bash
npm i -g @epubook/cliepubook --version
epubook --help
```## Resources
+ [EPUB 3.2 specification](https://www.w3.org/publishing/epub32/)
+ [EPUB 3.3 specification](https://www.w3.org/TR/epub-33/)
+ [epubcheck](https://github.com/w3c/epubcheck)
+ [epub-tests](https://w3c.github.io/epub-tests/)
+ [EbookLib](https://github.com/aerkalov/ebooklib)## License
MIT License © 2023 [XLor](https://github.com/yjl9903)