kdp-book-generator
Version:
Generate KDP-compliant PDFs and EPUBs from Markdown for Amazon book publishing
33 lines • 955 B
TypeScript
import { BookConfig, ParsedBook } from '../types';
export interface EPUBOptions {
outputPath: string;
coverImage?: string;
isbn?: string;
publisher?: string;
language?: string;
}
export declare class EPUBGenerator {
private zip;
private contentOpfId;
private chapters;
constructor();
generateEPUB(parsedBook: ParsedBook, config: BookConfig, options: EPUBOptions): Promise<void>;
private addCoverImage;
private createContainerXML;
private createContentOPF;
private createTOC;
private createNCX;
private extractChaptersFromHTML;
private createChapterFiles;
private createTitlePage;
private createChapterXHTML;
private createStylesheet;
private escapeXML;
private stripHTML;
private cleanIdAttribute;
private processHTMLForEPUB;
private createCoverPage;
private getImageMediaType;
private isSameChapter;
}
//# sourceMappingURL=epub-generator.d.ts.map