# epub-builder

> A module for creating epub files quickly and efficiently.

Latest version **1.2.5** (published 2017-04-16) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install epub-builder
pnpm add epub-builder
yarn add epub-builder
bun add epub-builder
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.5 |
| Published | 2017-04-16 |
| First published | 2017-01-08 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Charles Mulloy |
| Maintainers | charlesmulloy |

## Links

- npm: https://www.npmjs.com/package/epub-builder
- Repository: https://github.com/CharlesMulloy/epub-builder
- Homepage: https://github.com/CharlesMulloy/epub-builder#readme
- Issues: https://github.com/CharlesMulloy/epub-builder/issues
- npm.io page: https://npm.io/package/epub-builder

## Dependencies (3)

- [mime](https://npm.io/package/mime.md) ^1.3.4
- [archiver](https://npm.io/package/archiver.md) ^1.3.0
- [string-builder](https://npm.io/package/string-builder.md) ^0.1.4

## Recent versions

- 1.2.5 (latest) — 2017-04-16
- 1.2.4 — 2017-04-16
- 1.2.3 — 2017-01-19
- 1.1.3 — 2017-01-09
- 1.1.2 — 2017-01-08
- 1.1.1 — 2017-01-08

## README

Epub-Builder
==============

This library is designed to facilitate the creation of EPUB files as easily as possible. It is very basic and simple, so the features are limited, but it is also very quick and easy to understand.

To create a book you only need to follow this simple formula.

        var book = require("epub-builder");
        book.setTitle("This is a title");
        book.setAuthor("This is the author");
        book.setSummary("This is the summary");
        //Used to set the UUID of the book. Defaults to the current date according to the system's calendar if not set.
        book.setUUID("1234567890");
        //Repeat the following for each chapter you with to add.
        book.addChapter("Chapter Title", "Chapter Content");
        //Used to add a cover image to the book.
        book.addCoverImage("path/to/image.png");
        //Use the following method to add assets to the epub, such as stylesheets or images. Make sure that the content of the chapters assume that the assets are parallel to themselves and not in any other folder.
        book.addAsset("path/to/asset");
        //Do not add .epub to the title. That is done automatically.
        book.createBook("TestBook");


Version history
---------------
1.2.5
- Fixed version typo in README.md

1.2.4
- Cleaned up code.

1.1.1
- Allows manual setting of UUID.
- Cleaned up code.

1.1.0
- Allows setting of cover image.
- Allows adding assets to the book.



Todo list
---------
- Will deprecate createBook() and replace with another method so that the output filename can have any extension desired. File will still be an Epub file though.
- Set to automatically prettify text.

---
_Source: https://npm.io/package/epub-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
