mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Merge branch 'feature/customdocument26' into 'feature/ui-test'
Feature/customdocument26 See merge request proj-wise2526-video2document/video2document!90
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user