Merge branch 'feature/export-function-integration' into 'develop'

Changes to the LLMs to return a Promise (outp path) and main now calls the export process

See merge request proj-wise2526-video2document/video2document!50
This commit is contained in:
Spanier, Pit
2025-12-15 18:05:20 +01:00
4 changed files with 127 additions and 111 deletions
+8 -3
View File
@@ -124,10 +124,12 @@ electron.ipcMain.handle('get-module-names', async () => {
// mainWindow.webContents.send("modules", module_array)
// })
var globalArgs = {}
var globalFinalHtmlPath = ""
electron.ipcMain.on("file_submit", async (event, args) => {
try {
globalArgs = args
let curstep = 0
let totalsteps = 3 + args.document.styles.length
@@ -187,7 +189,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
await mapFunctions.get("module-handler").function(args.document.module, {inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/standard_meeting_report.txt", language: "en"}).then(resp => {
console.log(resp);
transcriptpath = resp
globalFinalHtmlPath = resp
curstep++
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps})
}).catch(err => {
@@ -195,7 +197,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
return
})
}
// TODO actually implement this functionality
// Module to get the first few lines for each speaker to send to the frontend
// await mapFunctions.get("speaker-getter-idfk").function(transcriptpath).then(resp => {
@@ -220,6 +222,9 @@ electron.ipcMain.on("file_submit", async (event, args) => {
}
})
electron.ipcMain.on("file_download", async() => {
await mapFunctions.get("htmlDocumentConverter").convert({inputPath:globalFinalHtmlPath, format: globalArgs.document.outputType, showDialog: true});
})
let q =