forked from cyrilis/epub-gen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
45 lines (45 loc) · 1.1 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export interface Chapter {
title?: string;
author?: string | string[];
data: string;
excludeFromToc?: boolean;
beforeToc?: boolean;
filename?: string;
url?: string;
}
export interface Options {
title: string;
author: string | string[];
publisher?: string;
cover?: string;
output?: string;
version?: 2 | 3;
css?: string;
fonts?: string[];
lang?: "en" | string;
appendChapterTitles?: boolean;
customOpfTemplatePath?: string;
customNcxTocTemplatePath?: string;
customHtmlTocTemplatePath?: string;
content?: Chapter[];
keywords?: string[];
source?: string;
trustContent?: boolean;
}
export interface IHost {
downloadFile(url: string, path: string): Promise<void>;
}
export default class EPub {
private readonly host;
private readonly options;
private id;
private uuid;
promise: Promise<void>;
constructor(options: Options, output?: string, host?: IHost);
private render;
private generateTempFile;
private makeCover;
private downloadAllImages;
private downloadImage;
private genEpub;
}