mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 41d651a84c | |||
| ea0ff25d1a | |||
| 4ac59e7597 | |||
| b5d374498f | |||
| 567ec0aa1b | |||
| 906929169e | |||
| df5ac8913d | |||
| 30ef4d4738 | |||
| 9696434145 | |||
| d84d4f6dee | |||
| 862d4b7a96 | |||
| 97075e79a6 | |||
| 9fc44bea63 | |||
| 9d5b71e2c7 | |||
| fdfbdec75a | |||
| 977f2f8244 | |||
| ecece5009e | |||
| 66762b8251 | |||
| 6f722b68e1 |
@@ -10,7 +10,144 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>Manage document types</h1>
|
||||||
|
|
||||||
|
<label for="existingDocs">Vorhandene Dokumententypen auswählen (optional):</label>
|
||||||
|
<!--Drop Down-->
|
||||||
|
<select name="existingDocs" id="existingDocs">
|
||||||
|
<option value="newDoc">-- Neuen Dokumententyp erstellen --</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<div id="docNameWrapper">
|
||||||
|
<label for="docName">Name des Dokumententyps:</label>
|
||||||
|
<input type="text" id="docName" placeholder="Gib hier den Namen für den Dokumententyp ein">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="prompt">Dein Prompt:</label>
|
||||||
|
<textarea id="prompt" placeholder="Schreibe hier den Prompt für dein Dokumententyp..."></textarea>
|
||||||
|
|
||||||
|
<div class="buttons">
|
||||||
|
<a href="index.html">
|
||||||
|
<button id="goBackBtn">Abbrechen</button>
|
||||||
|
</a>
|
||||||
|
<button id="deleteBtn">Dokumententyp löschen</button>
|
||||||
|
<button id="generateBtn">Dokumententyp speichern</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="result"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="languages.js"></script>
|
<script src="languages.js"></script>
|
||||||
|
<script>
|
||||||
|
const goBackBtn = document.getElementById("goBackBtn");
|
||||||
|
const generateBtn = document.getElementById("generateBtn");
|
||||||
|
const deleteBtn = document.getElementById("deleteBtn");
|
||||||
|
const existingDocs = document.getElementById("existingDocs");
|
||||||
|
const docNameInput = document.getElementById("docName");
|
||||||
|
const promptInput = document.getElementById("prompt");
|
||||||
|
const resultDiv = document.getElementById("result");
|
||||||
|
const exampleText = "";
|
||||||
|
|
||||||
|
// dokumente speichern
|
||||||
|
generateBtn.addEventListener("click", () => {
|
||||||
|
const name = docNameInput.value.trim();
|
||||||
|
const content = promptInput.value.trim();
|
||||||
|
if (!name || !content) {
|
||||||
|
resultDiv.textContent = "Bitte Name des Dokumententyps und Prompt ausfüllen.";
|
||||||
|
setTimeout(() => {
|
||||||
|
resultDiv.textContent = "";
|
||||||
|
}, 3000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.api.saveTxtFile(name, content).then();
|
||||||
|
resultDiv.textContent = "Dokumententyp erfolgreich gespeichert!";
|
||||||
|
setTimeout(() => {
|
||||||
|
resultDiv.textContent = "";
|
||||||
|
}, 3000);
|
||||||
|
reloadDocuments();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// dokumente löschen
|
||||||
|
deleteBtn.addEventListener("click", () => {
|
||||||
|
const name = docNameInput.value.trim();
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
resultDiv.textContent = "Bitte Name des Dokumententyps angeben.";
|
||||||
|
setTimeout(() => {
|
||||||
|
resultDiv.textContent = "";
|
||||||
|
}, 3000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const confirmDelete = confirm(
|
||||||
|
`Möchtest du den Dokumententyp "${name}" wirklich löschen?`
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!confirmDelete) return;
|
||||||
|
|
||||||
|
window.api.deleteTxtFile(name).then((success) => {
|
||||||
|
if (success) {
|
||||||
|
resultDiv.textContent = "Dokumententyp erfolgreich gelöscht!";
|
||||||
|
reloadDocuments();
|
||||||
|
existingDocs.value = "newDoc";
|
||||||
|
existingDocs.dispatchEvent(new Event("change"));
|
||||||
|
} else {
|
||||||
|
resultDiv.textContent = "Dokumententyp konnte nicht gelöscht werden.";
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
resultDiv.textContent = "";
|
||||||
|
}, 3000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//function to load existingDoc options to the drop down list
|
||||||
|
const select = document.getElementById('existingDocs');
|
||||||
|
|
||||||
|
window.api.getTxtFiles().then(files => {
|
||||||
|
reloadDocuments();
|
||||||
|
});
|
||||||
|
|
||||||
|
//content anzeigen
|
||||||
|
const docNameWrapper = document.getElementById("docNameWrapper");
|
||||||
|
|
||||||
|
existingDocs.addEventListener("change", async () => {
|
||||||
|
const selected = existingDocs.value;
|
||||||
|
|
||||||
|
if (selected === "newDoc") {
|
||||||
|
docNameWrapper.classList.remove("hidden");
|
||||||
|
docNameInput.value = "";
|
||||||
|
promptInput.value = exampleText;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
docNameWrapper.classList.add("hidden");
|
||||||
|
|
||||||
|
const content = await window.api.readTxtFile(selected);
|
||||||
|
promptInput.value = content;
|
||||||
|
docNameInput.value = selected.replace(".txt", "");
|
||||||
|
});
|
||||||
|
|
||||||
|
//reload drop down
|
||||||
|
function reloadDocuments() {
|
||||||
|
[...existingDocs.querySelectorAll('option:not([value="newDoc"])')]
|
||||||
|
.forEach(o => o.remove());
|
||||||
|
|
||||||
|
window.api.getTxtFiles().then(files => {
|
||||||
|
files.forEach(file => {
|
||||||
|
const option = document.createElement('option');
|
||||||
|
option.value = file;
|
||||||
|
option.textContent = file
|
||||||
|
.replace('.txt', '') // Endung entfernen
|
||||||
|
.replace(/_/g, ' ') // Leerzeichen ersetzen
|
||||||
|
.replace(/\b\w/g, c => c.toUpperCase()) // ersten Buchstaben groß
|
||||||
|
existingDocs.appendChild(option);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,320 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Anleitung</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background: #f0f2f5;
|
||||||
|
margin: 0;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== CONTAINER ===== */
|
||||||
|
.container {
|
||||||
|
background: white;
|
||||||
|
width: 90%;
|
||||||
|
max-width: 800px;
|
||||||
|
height: 85vh;
|
||||||
|
/* feste Höhe */
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== FIXER TOP-BEREICH ===== */
|
||||||
|
.top-bar {
|
||||||
|
padding: 15px 20px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
.back-btn,
|
||||||
|
.toc-toggle {
|
||||||
|
background: #007BFF;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 8px 14px;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-btn:hover,
|
||||||
|
.toc-toggle:hover {
|
||||||
|
background: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== TOC ===== */
|
||||||
|
.toc-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 45px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||||
|
padding: 10px;
|
||||||
|
min-width: 220px;
|
||||||
|
display: none;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc a {
|
||||||
|
display: block;
|
||||||
|
padding: 8px 10px;
|
||||||
|
color: #007BFF;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc a:hover {
|
||||||
|
background: #f0f2f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc.show {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== SCROLLBEREICH ===== */
|
||||||
|
.content {
|
||||||
|
padding: 30px;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inhalt */
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step h2 {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step h3 {
|
||||||
|
color: #555;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step p {
|
||||||
|
color: #555;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step img {
|
||||||
|
width: 100%;
|
||||||
|
max-height: 350px;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-top: 15px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- FIXER OBERER TEIL -->
|
||||||
|
<div class="top-bar">
|
||||||
|
<a href="index.html">
|
||||||
|
<button class="back-btn">Zurück</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<h1>Programm Anleitung</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="toc-wrapper">
|
||||||
|
<button class="toc-toggle" onclick="toggleTOC()">Inhaltsverzeichnis</button>
|
||||||
|
<div class="toc" id="toc">
|
||||||
|
<a href="#convertVid" onclick="closeTOC()">Video zu Dokument umwandeln</a>
|
||||||
|
<a href="#firstStep" onclick="closeTOC()">Schritt 1 - Video auswählen</a>
|
||||||
|
<a href="#secondStep" onclick="closeTOC()">Schritt 2 - Konfiguration</a>
|
||||||
|
<a href="#thirdStep" onclick="closeTOC()">Schritt 3 - Dokumententyp auswählen</a>
|
||||||
|
<a href="#fourthStep" onclick="closeTOC()">Schritt 4 - Bestätigen</a>
|
||||||
|
<a href="#fifthStep" onclick="closeTOC()">Schritt 5 - Sprecher identifizieren</a>
|
||||||
|
<a href="#sixthStep" onclick="closeTOC()">Schritt 6 - Dokument speichern</a>
|
||||||
|
<a href="#createDoc" onclick="closeTOC()">Dokumententyp erstellen</a>
|
||||||
|
<a href="#editDoc" onclick="closeTOC()">Dokumententyp bearbeiten</a>
|
||||||
|
<a href="#deleteDoc" onclick="closeTOC()">Dokumententyp löschen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- NUR DIESER TEIL SCROLLT -->
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<div class="step" id="convertVid">
|
||||||
|
<h2>Video in ein Dokument umwandeln.</h2>
|
||||||
|
|
||||||
|
<div class="step" id="firstStep">
|
||||||
|
<h3>Schritt 1 - Video auswählen</h3>
|
||||||
|
<p id="firstStep">
|
||||||
|
- Ziehe eine Videodatei in das Drag-and-Drop-Feld oder klicke auf <strong>„Video
|
||||||
|
suchen“</strong>,<br>
|
||||||
|
um eine Datei über deinen Dateibrowser auszuwählen.<br>
|
||||||
|
- Klicke anschließend auf <strong>Schritt 2</strong> oder auf den blauen Pfeil rechts, um
|
||||||
|
fortzufahren.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="step" id="secondStep">
|
||||||
|
<h3>Schritt 2 - Konfiguration</h3>
|
||||||
|
<p>
|
||||||
|
- Wähle im ersten Auswahlmenü die zu verwendende <strong>KI</strong>.<br>
|
||||||
|
- Wähle im zweiten Auswahlmenü das zu verwendende <strong>Transkriptions-Tool</strong>.<br>
|
||||||
|
- Wähle im dritten Auswahlmenü das <strong>Dateiformat</strong> des zu erstellenden
|
||||||
|
Dokuments.<br>
|
||||||
|
- Wähle im vierten Auswahlmenü die <strong>Sprache</strong> des zu erstellenden Dokuments.<br>
|
||||||
|
- Klicke anschließend auf <strong>Schritt 3</strong> oder auf den blauen Pfeil rechts, um
|
||||||
|
fortzufahren.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="step" id="thirdStep">
|
||||||
|
<h3>Schritt 3 - Dokumententyp auswählen</h3>
|
||||||
|
<p>
|
||||||
|
- Wähle einen Dokumententyp über die Checkbox oder einen zuvor erstellten Dokumententyp aus dem
|
||||||
|
Dropdown-Menü aus.<br>
|
||||||
|
- Klicke anschließend auf <strong>Schritt 4</strong> oder auf den blauen Pfeil rechts, um
|
||||||
|
fortzufahren.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="step" id="fourthStep">
|
||||||
|
<h3>Schritt 4 - Bestätigen</h3>
|
||||||
|
<p>
|
||||||
|
Klicke auf <strong>„Submit“</strong>, um die Dokumentengenerierung zu starten.<br>
|
||||||
|
Während der Verarbeitung werden vier Statuspunkte angezeigt, die sich schrittweise von rot zu
|
||||||
|
grün färben und den aktuellen Fortschritt darstellen:
|
||||||
|
<br><br>
|
||||||
|
Punkt 1: Upload und Vorbereitung der Videodatei.<br>
|
||||||
|
Punkt 2: Transkription des Videoinhalts.<br>
|
||||||
|
Punkt 3: KI-gestützte Verarbeitung und Dokumentenerstellung.<br>
|
||||||
|
Punkt 4: Abschluss der Generierung und Bereitstellung des Dokuments.
|
||||||
|
<br><br>
|
||||||
|
Nach erfolgreichem Abschluss klicke auf <strong>Schritt 5</strong> oder auf den blauen Pfeil
|
||||||
|
rechts, um fortzufahren.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="step" id="fifthStep">
|
||||||
|
<h3>Schritt 5 - Sprecher identifizieren</h3>
|
||||||
|
<p>
|
||||||
|
Im Auswahlmenü kannst du einen erkannten Sprecher auswählen.<br>
|
||||||
|
Über den Play-Button lässt sich ein gesprochener Satz anhören, um den Sprecher eindeutig zu
|
||||||
|
identifizieren.<br>
|
||||||
|
Mit dem Lautsprecher-Symbol kannst du die Lautstärke anpassen.<br>
|
||||||
|
Über das Drei-Punkte-Menü lässt sich die Wiedergabegeschwindigkeit einstellen.<br><br>
|
||||||
|
|
||||||
|
Im Textfeld <strong>„Write name“</strong> gibst du den tatsächlichen Namen des Sprechers ein,
|
||||||
|
damit dieser im Dokument
|
||||||
|
anstelle von Platzhaltern wie z. B. „Sprecher A“ angezeigt wird.<br>
|
||||||
|
Bestätige die Eingabe mit <strong>„Rename Speaker“</strong>.<br><br>
|
||||||
|
|
||||||
|
Mit dem Button <strong>„Rewrite Document“</strong> werden anschließend alle
|
||||||
|
Sprecherbezeichnungen im Dokument ersetzt.<br><br>
|
||||||
|
|
||||||
|
Klicke danach auf <strong>Schritt 6</strong> oder auf den blauen Pfeil rechts, um fortzufahren.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="step" id="sixthStep">
|
||||||
|
<h3>Schritt 6 - Dokument speichern</h3>
|
||||||
|
<p>
|
||||||
|
Klicke auf <strong>„Download“</strong>, um das Dokument zu speichern.<br>
|
||||||
|
Es öffnet sich anschließend ein Dateiexplorer, in dem du den gewünschten Speicherort auswählen
|
||||||
|
kannst.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="step" id="createDoc">
|
||||||
|
<h2>Dokumententyp erstellen</h2>
|
||||||
|
<p>
|
||||||
|
- Öffne oben links das Burgermenü und wähle den Punkt <strong>„Dokumententypen
|
||||||
|
verwalten“</strong>.<br>
|
||||||
|
- Wähle anschließend im Auswahlmenü die Option <strong>„-- Neuen Dokumententyp erstellen
|
||||||
|
--“</strong>.<br>
|
||||||
|
- Vergib einen aussagekräftigen Namen für den neuen Dokumententyp.<br>
|
||||||
|
- Formuliere den Prompt für die KI-gestützte Verarbeitung sorgfältig.<br>
|
||||||
|
- Klicke auf <strong>Dokumententyp speichern</strong>.<br><br>
|
||||||
|
<strong>Hinweis:</strong> <br>Der eingegebene Prompt wird unverändert an einen KI-Dienst
|
||||||
|
übermittelt.
|
||||||
|
Achte daher unbedingt auf die Einhaltung der geltenden Datenschutzrichtlinien und gib keine
|
||||||
|
sensiblen oder personenbezogenen Daten ein.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="step" id="editDoc">
|
||||||
|
<h2>Dokumententyp bearbeiten</h2>
|
||||||
|
<p>
|
||||||
|
- Öffne oben links das Burgermenü und wähle den Punkt <strong>„Dokumententypen
|
||||||
|
verwalten“</strong>.<br>
|
||||||
|
- Wähle anschließend im Auswahlmenü den zu bearbeitenden Dokumententyp aus.<br>
|
||||||
|
- Überarbeite den bestehenden KI-Prompt oder formuliere einen neuen Prompt.<br>
|
||||||
|
- Klicke abschließend auf <strong>„Dokumententyp speichern“</strong>.<br><br>
|
||||||
|
|
||||||
|
<strong>Hinweis:</strong><br>
|
||||||
|
Der eingegebene Prompt wird unverändert an einen KI-Dienst übermittelt.
|
||||||
|
Achte daher unbedingt auf die Einhaltung der geltenden Datenschutzrichtlinien und gib keine
|
||||||
|
sensiblen oder personenbezogenen Daten ein.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="step" id="deleteDoc">
|
||||||
|
<h2>Dokumententyp löschen</h2>
|
||||||
|
<p> - Öffne oben links das Burgermenü und wähle den Punkt <strong>„Dokumententypen
|
||||||
|
verwalten“</strong>.<br>
|
||||||
|
- Wähle anschließend im Auswahlmenü den zu löschenden Dokumententyp aus.<br>
|
||||||
|
- Klicke abschließend auf <strong>„Dokumententyp löschen“</strong>.<br><br>
|
||||||
|
|
||||||
|
<strong>Hinweis:</strong><br>
|
||||||
|
Nach Bestätigung des Löschvorgangs kann der Dokumententyp nicht wiederhergestellt werden.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleTOC() {
|
||||||
|
document.getElementById("toc").classList.toggle("show");
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeTOC() {
|
||||||
|
document.getElementById("toc").classList.remove("show");
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
const toc = document.getElementById("toc");
|
||||||
|
const toggle = document.querySelector(".toc-toggle");
|
||||||
|
|
||||||
|
if (!toc.contains(e.target) && !toggle.contains(e.target)) {
|
||||||
|
toc.classList.remove("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
@@ -110,7 +110,7 @@
|
|||||||
<label id="labelType">Select type:</label>
|
<label id="labelType">Select type:</label>
|
||||||
<select name="output_type" id="output_type">
|
<select name="output_type" id="output_type">
|
||||||
<option value="pdf">.pdf</option>
|
<option value="pdf">.pdf</option>
|
||||||
<option value="word">.word</option>
|
<option value="word">.docx</option>
|
||||||
<option value="txt">.txt</option>
|
<option value="txt">.txt</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,18 +133,25 @@
|
|||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<input type="checkbox" name ="docFormat" id="docFormat" value="followup-report">
|
<input type="checkbox" name ="docFormat" id="docFormat" value="followup-report">
|
||||||
<label id="label_format" for="docFormat">Follow-up Report</label>
|
<label id="label_format" for="docFormat">Follow-up Report</label>
|
||||||
|
<div class="figure1">
|
||||||
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
|
<img class="img-hover1" src="flags/germany-flag-png-large.jpg">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
|
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
|
||||||
<label id="label_summary" for="docFormatSummary">Agenda</label>
|
<label id="label_summary" for="docFormatSummary">Agenda</label>
|
||||||
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol">
|
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol">
|
||||||
<label id="label_summary" for="docFormatSummary">Resultprotocol</label>
|
<label id="label_summary" for="docFormatSummary">Resultprotocol</label>
|
||||||
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning">
|
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning">
|
||||||
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label>
|
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label>
|
||||||
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<input type="checkbox" name="docFormat" id="docFormatCustom" value="custom">
|
<input type="checkbox" name="docFormat" id="docFormatCustom" value="custom">
|
||||||
@@ -156,7 +163,7 @@
|
|||||||
|
|
||||||
<!-- Here starts code from step 4-->
|
<!-- Here starts code from step 4-->
|
||||||
<div class="step" id="step4" style="display:none;">
|
<div class="step" id="step4" style="display:none;">
|
||||||
<h2 class="h2">Klick to submit:</h2>
|
<h2 class="h2">Click to submit:</h2>
|
||||||
<button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
|
<button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
|
||||||
|
|
||||||
<div class="testy" id="testy">
|
<div class="testy" id="testy">
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ Functions used in Step 4
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//function to check if one checkbox is at least klicked. Final controll function before sending the input to the generation
|
//function to check if one checkbox is at least clicked. Final controll function before sending the input to the generation
|
||||||
function checkBoxes() {
|
function checkBoxes() {
|
||||||
try {
|
try {
|
||||||
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
||||||
@@ -308,6 +308,7 @@ function checkBoxes() {
|
|||||||
const outputType = document.getElementById("output_type");
|
const outputType = document.getElementById("output_type");
|
||||||
const transcriptionType = document.getElementById("transkript_type");
|
const transcriptionType = document.getElementById("transkript_type");
|
||||||
const aiType = document.getElementById("ai_type");
|
const aiType = document.getElementById("ai_type");
|
||||||
|
const docLanguage = document.getElementById("document_language_option");
|
||||||
const sendingPackage = {
|
const sendingPackage = {
|
||||||
"video": {
|
"video": {
|
||||||
"module": "extraction-video-to-audio",
|
"module": "extraction-video-to-audio",
|
||||||
@@ -319,9 +320,11 @@ function checkBoxes() {
|
|||||||
"document": {
|
"document": {
|
||||||
"module": aiType.value,
|
"module": aiType.value,
|
||||||
"type": typeCheckbox,
|
"type": typeCheckbox,
|
||||||
"outputType": outputType.value
|
"outputType": outputType.value,
|
||||||
|
"outputLanguage": docLanguage.value
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
console.log(docLanguage.value);
|
||||||
window.submit.submit(sendingPackage)
|
window.submit.submit(sendingPackage)
|
||||||
} else {
|
} else {
|
||||||
alert('The given file is not compatible. These are the available types: [".mp4", ".mov", ".avi", ".mkv"].');
|
alert('The given file is not compatible. These are the available types: [".mp4", ".mov", ".avi", ".mkv"].');
|
||||||
|
|||||||
+27
-1
@@ -186,6 +186,31 @@ input[type="file"] {
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.figure1 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-hover1 {
|
||||||
|
position: absolute;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
top: 0;
|
||||||
|
right: 40%;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
display: none;
|
||||||
|
transition: opacity .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure1:hover .img-hover1 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-icon {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -308,7 +333,8 @@ input[type="file"] {
|
|||||||
/*panels*/
|
/*panels*/
|
||||||
.step {
|
.step {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
margin-bottom: 40px;;
|
margin-bottom: 40px;
|
||||||
|
;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 425px;
|
min-height: 425px;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Last modified: 2024-06-11 12:28:00
|
||||||
// Loading required packages
|
// Loading required packages
|
||||||
require("./requires.js");
|
require("./requires.js");
|
||||||
console.log(start);
|
console.log(start);
|
||||||
@@ -110,9 +111,18 @@ electron.ipcMain.handle('get-module-names', async () => {
|
|||||||
"ai_modules":[],
|
"ai_modules":[],
|
||||||
"transcription_modules":[]
|
"transcription_modules":[]
|
||||||
}
|
}
|
||||||
});
|
mapFunctions.forEach(e => {
|
||||||
|
switch(e.type){
|
||||||
|
case "llm":
|
||||||
|
module_array.ai_modules.push({"name": e.name, "displayname": e.displayname})
|
||||||
|
break;
|
||||||
|
case "transcription":
|
||||||
|
module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
// console.log(module_array);
|
// console.log(module_array);
|
||||||
return module_array;
|
return module_array
|
||||||
});
|
});
|
||||||
|
|
||||||
// electron.ipcMain.on("get_modules", async (event, args) => {
|
// electron.ipcMain.on("get_modules", async (event, args) => {
|
||||||
@@ -186,6 +196,29 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log("\n\n Running the Audio to Transcription module");
|
||||||
|
// TODO implement transcription module
|
||||||
|
// This code handles the Audio to Text transcription module call
|
||||||
|
await mapFunctions
|
||||||
|
.get("module-handler")
|
||||||
|
.function(args.transcription.module, audiopath)
|
||||||
|
.then((resp) => {
|
||||||
|
console.log(resp);
|
||||||
|
transcriptpath = resp;
|
||||||
|
curstep++;
|
||||||
|
mainWindow.webContents.send("progress", {
|
||||||
|
curstep: curstep,
|
||||||
|
totalsteps: totalsteps,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
mainWindow.webContents.send("error", err);
|
||||||
|
console.log(err);
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log("\n\n Running the Transcription Summarizer module");
|
console.log("\n\n Running the Transcription Summarizer module");
|
||||||
// This code summarises the transcript, so that it can be used by an llm
|
// This code summarises the transcript, so that it can be used by an llm
|
||||||
// await mapFunctions.get("summarize-transcription").function('A:\\programing\\@projects\\video2document\\storage\\transcripts\\IMG_2978.json').then(resp => {
|
// await mapFunctions.get("summarize-transcription").function('A:\\programing\\@projects\\video2document\\storage\\transcripts\\IMG_2978.json').then(resp => {
|
||||||
@@ -220,7 +253,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
|||||||
.function(args.document.module, {
|
.function(args.document.module, {
|
||||||
inputTranscriptPath: transcriptpath,
|
inputTranscriptPath: transcriptpath,
|
||||||
documentTypePath: "./storage/documentType/" + templateFile,
|
documentTypePath: "./storage/documentType/" + templateFile,
|
||||||
language: "en",
|
language: args.document.outputLanguage
|
||||||
})
|
})
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// const fs = require('fs');
|
// const fs = require('fs');
|
||||||
// const path = require('path');
|
// const path = require('path');
|
||||||
|
|
||||||
|
const e = require("express");
|
||||||
|
|
||||||
const outputDir = path.join(__dirname, "../../../storage/documents"); // path for output directory
|
const outputDir = path.join(__dirname, "../../../storage/documents"); // path for output directory
|
||||||
|
|
||||||
if (!fs.existsSync(outputDir)) {
|
if (!fs.existsSync(outputDir)) {
|
||||||
@@ -40,6 +42,14 @@ const module_exports = {
|
|||||||
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
||||||
return new Promise(async(resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
|
if (language.toLowerCase() === "de") {
|
||||||
|
language = "German"
|
||||||
|
}else if (language.toLowerCase() === "in") {
|
||||||
|
language = "Indish"
|
||||||
|
} else {
|
||||||
|
language = "English"
|
||||||
|
}
|
||||||
|
|
||||||
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
||||||
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
||||||
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ const module_exports = {
|
|||||||
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
||||||
return new Promise(async(resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
|
if (language.toLowerCase() === "de") {
|
||||||
|
language = "German"
|
||||||
|
}else if (language.toLowerCase() === "in") {
|
||||||
|
language = "Indish"
|
||||||
|
} else {
|
||||||
|
language = "English"
|
||||||
|
}
|
||||||
|
|
||||||
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
||||||
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
||||||
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ const module_exports = {
|
|||||||
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
|
||||||
return new Promise(async(resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
|
if (language.toLowerCase() === "de") {
|
||||||
|
language = "German"
|
||||||
|
}else if (language.toLowerCase() === "in") {
|
||||||
|
language = "Indish"
|
||||||
|
} else {
|
||||||
|
language = "English"
|
||||||
|
}
|
||||||
|
|
||||||
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
|
||||||
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
|
||||||
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
|
||||||
|
|||||||
Reference in New Issue
Block a user