diff --git a/src/python/classes/mainwindow.py b/src/python/classes/mainwindow.py index ec3b358..20ddc7d 100644 --- a/src/python/classes/mainwindow.py +++ b/src/python/classes/mainwindow.py @@ -3,6 +3,8 @@ from PyQt5.QtWidgets import QMainWindow, QLabel,\ QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout from PyQt5.QtCore import Qt from src.python.ui.mainwindow_ui import Ui_MainWindow +import tempfile +import subprocess class MainWindow(QMainWindow, Ui_MainWindow): @@ -22,6 +24,8 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.button_select_avatar_3.clicked.connect(lambda: self.open_image_import(image_number=3)) self.button_select_avatar_4.clicked.connect(lambda: self.open_image_import(image_number=4)) + self.button_generate.clicked.connect(self.generate_video_podcast) + def setup_detail(self): self.line_edit_name_1.setDisabled(True) self.line_edit_name_2.setDisabled(True) @@ -106,4 +110,9 @@ class MainWindow(QMainWindow, Ui_MainWindow): def generate_video_podcast(self): # TODO: Change to pure python """Generate podcast based on values from UI.""" + with tempfile.TemporaryDirectory() as tmp_dir_name: + print('created temporary directory', tmp_dir_name) + echo_temp_dir_name = subprocess.check_output(["echo", tmp_dir_name]).decode('utf-8') + print(echo_temp_dir_name) + pass