MCPcopy Create free account
hub / github.com/buxuku/VideoSubtitleGenerator / renderFilePath

Function renderFilePath

utils.js:18–27  ·  view source on GitHub ↗
(template, fileName)

Source from the content-addressed store, hash-verified

16};
17
18export const renderFilePath = (template, fileName) => {
19 const data = {
20 fileName,
21 sourceLanguage: translateConfig.sourceLanguage,
22 targetLanguage: translateConfig.targetLanguage,
23 };
24 const finalPath = template || 'temp-${fileName}'; // 如果不保存字幕文件,需要先生成临时文件
25 const filePath = renderTemplate(finalPath, data);
26 return `${videoDir}/${filePath}`;
27};
28
29export const extractAudio = (videoPath, audioPath) => {
30 return new Promise((resolve, reject) => {

Callers 1

index.jsFile · 0.90

Calls 1

renderTemplateFunction · 0.85

Tested by

no test coverage detected