epub 1.0.1
An epub generator
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
epub: make epubs in D
This is a little library to create ebooks in epub format in D.
Getting it
Add "epub": "~>1.0.0"
to your dub.json.
Using it
To create an epub, you first assemble your book, then call toEpub
on it.
A quick example:
import epub;
void main()
{
auto book = new Book;
book.title = "Grunthos the Flatulent";
book.author = "Ode to a Small Lump of Green Putty";
book.coverImage = Attachment(
// file ID
"cover",
// filename
"cover.png",
// MIME type
"image/png",
// content
import("cover.png"));
book.chapters ~= Chapter(
// title
"The Putty",
// show in table of contents?
true,
// body as XHTML document
import("poem.xhtml"));
book.toEpub("putty.epub");
}
If you don't want to emit directly to a file, you can call toEpub
with a ZipArchive from std.zip
instead of a filename.
Bugs?
Please file any issues at https://github.com/dhasenan/epub/issues !
- Registered by Christopher Wright
- 1.0.1 released 6 years ago
- dhasenan/epub
- Ms-PL
- Copyright © 2017, dhasenan
- Authors:
- Dependencies:
- none
- Versions:
-
1.2.0 2021-Jun-02 1.1.2 2018-Oct-25 1.1.0 2018-Apr-01 1.0.1 2018-Mar-30 1.0.0 2017-Apr-27 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
46 downloads total
-
- Score:
- 0.0
- Short URL:
- epub.dub.pm