https://github.com/waptik/epubgen
This is a deno module based on https://github.com/cpiber/epub-gen-memory to generate epub files
https://github.com/waptik/epubgen
deno epub epub-generation epub3
Last synced: 9 months ago
JSON representation
This is a deno module based on https://github.com/cpiber/epub-gen-memory to generate epub files
- Host: GitHub
- URL: https://github.com/waptik/epubgen
- Owner: waptik
- License: mit
- Created: 2022-08-28T22:02:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-26T03:56:17.000Z (about 2 years ago)
- Last Synced: 2025-10-04T04:39:58.783Z (9 months ago)
- Topics: deno, epub, epub-generation, epub3
- Language: TypeScript
- Homepage: https://deno.land/x/epubgen
- Size: 1.24 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deno Epub generator
A wrapper around [epub-gen-memory](https://github.com/cpiber/epub-gen-memory)
for deno.
## Usage:
Create epub file:
```ts
import epub from "https://deno.land/x/epubgen/mod.ts";
epub(options, chapters).then(
(content) => console.log("Ebook Generated Successfully!"),
(err) => console.error("Failed to generate Ebook because of ", err),
);
```
## Example
```ts
import epub from "https://deno.land/x/epubgen/mod.ts";
import * as path from "https://deno.land/std@0.159.0/path/mod.ts";
const options = {
title: "Book Title",
description: "This is a test book",
author: "John",
// cover: path.toFileUrl(path.resolve("cover.jpg")).href,
cover:
"http://orig10.deviantart.net/e272/f/2013/255/0/0/alice_in_wonderland_book_cover_by_pannucabaguana-d6m003p.jpg",
};
epub(options, [
{
title: "Chapter 1",
content: "
Hello world!
",
},
]).then(
(content) => {
Deno.writeFileSync("book.epub", content);
},
(err) => console.error("Failed to generate Ebook because of ", err),
);
```
## Epub Check Online