fix: add support for kepub

issue: #301
This commit is contained in:
C4illin 2025-06-02 15:51:35 +02:00
parent 2490c3a7e7
commit 33388cf209

View file

@ -39,6 +39,7 @@ export const properties = {
"fb2", "fb2",
"html", "html",
"htmlz", "htmlz",
"kepub.epub",
"lit", "lit",
"lrf", "lrf",
"mobi", "mobi",
@ -65,7 +66,10 @@ export async function convert(
options?: unknown, options?: unknown,
): Promise<string> { ): Promise<string> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
execFile("ebook-convert", [filePath, targetPath], (error, stdout, stderr) => { execFile(
"ebook-convert",
[filePath, targetPath],
(error, stdout, stderr) => {
if (error) { if (error) {
reject(`error: ${error}`); reject(`error: ${error}`);
} }
@ -79,6 +83,7 @@ export async function convert(
} }
resolve("Done"); resolve("Done");
}); },
);
}); });
} }