mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f6ffa702c | |||
| d09b75a6cd | |||
| 0427056f65 | |||
| 8076fe92f5 | |||
| c2e6c4a186 | |||
| 826381d858 |
+28
-17
@@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -7,9 +8,10 @@
|
|||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/themes/light.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/themes/light.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="h1-wrapper">
|
<div id="h1-wrapper">
|
||||||
<section class="p-menu1">
|
<section class="p-menu1">
|
||||||
<nav id="navbar" class="navigation" role="navigation">
|
<nav id="navbar" class="navigation" role="navigation">
|
||||||
<input id="toggle1" type="checkbox" />
|
<input id="toggle1" type="checkbox" />
|
||||||
@@ -28,26 +30,25 @@
|
|||||||
|
|
||||||
<h1 id="h1">Video to document</h1>
|
<h1 id="h1">Video to document</h1>
|
||||||
|
|
||||||
<div class="gui-language">
|
<div class="gui-language">
|
||||||
<!-- to do: Ausprobieren mit li, a oder button, im Notfall ohne Flaggen Icons, kein hover-->
|
<select name="language_option" id="language_option"></select>
|
||||||
<select name="language_option" id="language_option"></select>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="step-nav">
|
<div class="step-nav">
|
||||||
<div class="step-item active" data-step="1" id="step_nav1">1. Step</div>
|
<div class="step-item active" data-step="1" id="step_nav1">1. Step</div>
|
||||||
<div class="step-item" data-step="2" id="step_nav2">2. Step</div>
|
<div class="step-item" data-step="2" id="step_nav2">2. Step</div>
|
||||||
<div class="step-item" data-step="3" id="step_nav3">3. Step</div>
|
<div class="step-item" data-step="3" id="step_nav3">3. Step</div>
|
||||||
<div class="step-item" data-step="4" id="step_nav4">4. Step</div>
|
<div class="step-item" data-step="4" id="step_nav4">4. Step</div>
|
||||||
<div class="step-item" data-step="5" id="step_nav5">5. Step</div>
|
<div class="step-item" data-step="5" id="step_nav5">5. Step</div>
|
||||||
<div class="step-item" data-step="6" id="step_nav6">6. Step</div>
|
<div class="step-item" data-step="6" id="step_nav6">6. Step</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="middleContainerWrapper" class="middle-container-wrapper">
|
<div id="middleContainerWrapper" class="middle-container-wrapper">
|
||||||
<button id="prevBtn" class="navBtn" disabled>←</button>
|
<button id="prevBtn" class="navBtn" disabled>←</button>
|
||||||
|
|
||||||
<!-- Visible middle part-->
|
<!-- Visible middle part-->
|
||||||
<div class="mitte" id="mitte">
|
<div class="mitte" id="mitte">
|
||||||
|
|
||||||
<!--Costum document section-->
|
<!--Costum document section-->
|
||||||
@@ -131,7 +132,7 @@
|
|||||||
<div class="checkbox-group">
|
<div class="checkbox-group">
|
||||||
<h2 class="h2">Choose prefered document style:</h2>
|
<h2 class="h2">Choose prefered document style:</h2>
|
||||||
<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">
|
<div class="figure1">
|
||||||
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
@@ -141,17 +142,26 @@
|
|||||||
<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>
|
||||||
|
<div class="figure2">
|
||||||
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
|
<img class="img-hover2" src="flags/india-flag-png-large.png">
|
||||||
|
</div>
|
||||||
</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>
|
||||||
|
<div class="figure3">
|
||||||
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
|
<img class="img-hover3" src="flags/united-kingdom-flag-png-large.jpg">
|
||||||
|
</div>
|
||||||
</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>
|
||||||
|
<div class="figure4">
|
||||||
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
|
||||||
|
<img class="img-hover4" src="flags/germany-flag-png-large.jpg">
|
||||||
|
</div>
|
||||||
</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">
|
||||||
@@ -212,12 +222,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id ="nextBtn" class="navBtn">→</button>
|
<button id="nextBtn" class="navBtn">→</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/lc_select.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/lc_select.min.js"></script>
|
||||||
<script src="languages.js"></script>
|
<script src="languages.js"></script>
|
||||||
<script src="script.js"></script>
|
<script src="script.js"></script>
|
||||||
<script src="./renderer.js"></script>
|
<script src="./renderer.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+82
-6
@@ -186,6 +186,8 @@ input[type="file"] {
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hover effects for all different document options (with placeholders)*/
|
||||||
|
|
||||||
.figure1 {
|
.figure1 {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -201,12 +203,79 @@ input[type="file"] {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
display: none;
|
display: none;
|
||||||
transition: opacity .2s;
|
transition: opacity .2s;
|
||||||
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.figure1:hover .img-hover1 {
|
.figure1:hover .img-hover1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.figure2 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-hover2 {
|
||||||
|
position: absolute;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
top: 0;
|
||||||
|
right: 40%;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
display: none;
|
||||||
|
transition: opacity .2s;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure2:hover .img-hover2 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure3 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-hover3 {
|
||||||
|
position: absolute;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
top: 0;
|
||||||
|
right: 40%;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
display: none;
|
||||||
|
transition: opacity .2s;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure3:hover .img-hover3 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure4 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-hover4 {
|
||||||
|
position: absolute;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
top: 0;
|
||||||
|
right: 40%;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
display: none;
|
||||||
|
transition: opacity .2s;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure4:hover .img-hover4 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.img-icon {
|
.img-icon {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
@@ -236,7 +305,7 @@ input[type="file"] {
|
|||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 780px;
|
width: 780px;
|
||||||
height: 500px;
|
height: 550px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
@@ -245,6 +314,7 @@ input[type="file"] {
|
|||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
padding-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progressbar {
|
.progressbar {
|
||||||
@@ -477,7 +547,14 @@ li {
|
|||||||
-webkit-transition: all 0.3s ease;
|
-webkit-transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu1 a:first-child {
|
#customDocBtn {
|
||||||
|
border: none;
|
||||||
|
background-color:#1C3B69;
|
||||||
|
font: 700 20px 'Oswald', sans-serif;
|
||||||
|
border-radius: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu1 button:first-child {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +571,7 @@ li {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.li1:hover {
|
.li1:hover, #customDocBtn:hover{
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
color: rgb(61, 61, 61);
|
color: rgb(61, 61, 61);
|
||||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
@@ -562,10 +639,9 @@ li {
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 30px;
|
padding: 10px;
|
||||||
margin-top: 50px;
|
margin-top: 30px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 650px;
|
max-width: 650px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,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: args.document.outputLanguage
|
language: "en",
|
||||||
})
|
})
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
// 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)) {
|
||||||
@@ -42,14 +40,6 @@ 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,14 +40,6 @@ 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,14 +40,6 @@ 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