added ffmpeg

This commit is contained in:
C4illin 2024-05-21 15:34:38 +02:00
parent e55b8abaa0
commit 4aeeaa5060
8 changed files with 911 additions and 113 deletions

View file

@ -115,15 +115,23 @@ export const properties = {
],
};
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
export function convert(
filePath: string,
fileType: string,
convertTo: string,
targetPath: string,
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
options?: any,
) {
return exec(
`pandoc "${filePath}" -f ${fileType} -t ${convertTo} -o "${targetPath}"`,
(error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
console.error(`stderr: ${stderr}`);
},
);
}