Separaten Output-Ordner für INVRPT → VDA 4913 Konvertierungen hinzufügen

Der eingehende Watcher nutzt denselben Input-Ordner für alle Dateitypen,
schreibt INVRPT-Konvertierungen nun aber in einen konfigurierbaren
separaten Output-Ordner. Bleibt das Feld leer, wird der Standard-
Output-Ordner als Fallback verwendet (abwärtskompatibel).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
zed
2026-03-13 12:22:45 +01:00
parent 5ebcad02ed
commit 67bd64b688
4 changed files with 43 additions and 9 deletions

10
main.js
View File

@@ -15,7 +15,7 @@ const edifactValidator = require('./js/edifact-validator');
let mainWindow = null;
let watcher = null;
let watcherPaused = false;
let watcherConfig = { inputDir: '', outputDir: '', mode: 'auto' };
let watcherConfig = { inputDir: '', outputDir: '', invrptOutputDir: '', mode: 'auto' };
let outboundWatcher = null;
let outboundWatcherPaused = false;
@@ -116,8 +116,8 @@ function loadSettings() {
}
} catch (e) { console.error('Settings load error:', e); }
return {
inputDir: '', outputDir: '', mode: 'auto',
outboundInputDir: '', outboundOutputDir: '', mode: 'auto',
inputDir: '', outputDir: '', invrptOutputDir: '', mode: 'auto',
outboundInputDir: '', outboundOutputDir: '',
werksInputDir: '', werksOutputDir: ''
};
}
@@ -219,6 +219,7 @@ ipcMain.handle('start-watcher', (_, config) => {
const inputDir = watcherConfig.inputDir;
const outputDir = watcherConfig.outputDir;
const invrptOutputDir = watcherConfig.invrptOutputDir || '';
if (!inputDir || !outputDir) {
return { error: 'Input- und Output-Ordner müssen angegeben werden.' };
@@ -293,7 +294,8 @@ ipcMain.handle('start-watcher', (_, config) => {
filePath,
fileName,
content,
outputDir
outputDir,
invrptOutputDir
});
console.log(`[Watcher] Sent to renderer: ${fileName} (${content.length} bytes)`);