Add execute bash 'echo script'. Add creating temporary directory.
This commit is contained in:
parent
4d275c855d
commit
908236f5f1
@ -3,6 +3,8 @@ from PyQt5.QtWidgets import QMainWindow, QLabel,\
|
|||||||
QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout
|
QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
||||||
|
import tempfile
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
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_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_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):
|
def setup_detail(self):
|
||||||
self.line_edit_name_1.setDisabled(True)
|
self.line_edit_name_1.setDisabled(True)
|
||||||
self.line_edit_name_2.setDisabled(True)
|
self.line_edit_name_2.setDisabled(True)
|
||||||
@ -106,4 +110,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
def generate_video_podcast(self):
|
def generate_video_podcast(self):
|
||||||
# TODO: Change to pure python
|
# TODO: Change to pure python
|
||||||
"""Generate podcast based on values from UI."""
|
"""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
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user