diff --git a/.vscode/settings.json b/.vscode/settings.json
index 32ac337..d44d116 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,6 +5,7 @@
"--disable=all",
"--enable=E",
"--extension-pkg-whitelist=PySide2,PyQt5"
- ]
+ ],
+ "git.ignoreLimitWarning": true
}
\ No newline at end of file
diff --git a/89/chromedriver.exe b/89/chromedriver.exe
deleted file mode 100644
index d51602d..0000000
Binary files a/89/chromedriver.exe and /dev/null differ
diff --git a/UI_MAIN.py b/UI_MAIN.py
index 5d83231..1146764 100644
--- a/UI_MAIN.py
+++ b/UI_MAIN.py
@@ -1,146 +1,146 @@
# -*- coding: utf-8 -*-
-################################################################################
-## Form generated from reading UI file 'UI_MAIN.ui'
-##
-## Created by: Qt User Interface Compiler version 5.15.2
-##
-## WARNING! All changes made in this file will be lost when recompiling UI file!
-################################################################################
+# Form implementation generated from reading ui file '.\UI_MAIN.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.2
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again. Do not edit this file unless you know what you are doing.
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
+
+from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
- if not MainWindow.objectName():
- MainWindow.setObjectName(u"MainWindow")
+ MainWindow.setObjectName("MainWindow")
MainWindow.setEnabled(True)
- MainWindow.resize(649, 198)
- MainWindow.setMinimumSize(QSize(268, 167))
- MainWindow.setMaximumSize(QSize(16777215, 16777215))
- self.centralwidget = QWidget(MainWindow)
- self.centralwidget.setObjectName(u"centralwidget")
- self.wholeFrame = QFrame(self.centralwidget)
- self.wholeFrame.setObjectName(u"wholeFrame")
- self.wholeFrame.setGeometry(QRect(9, 10, 621, 151))
- self.wholeFrame.setFrameShape(QFrame.Box)
- self.wholeFrame.setFrameShadow(QFrame.Raised)
- self.reloadBtn = QPushButton(self.wholeFrame)
- self.reloadBtn.setObjectName(u"reloadBtn")
- self.reloadBtn.setGeometry(QRect(520, 110, 91, 28))
- font = QFont()
+ MainWindow.resize(635, 416)
+ MainWindow.setMinimumSize(QtCore.QSize(268, 167))
+ MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.wholeFrame = QtWidgets.QFrame(self.centralwidget)
+ self.wholeFrame.setGeometry(QtCore.QRect(9, 10, 611, 151))
+ self.wholeFrame.setFrameShape(QtWidgets.QFrame.Box)
+ self.wholeFrame.setFrameShadow(QtWidgets.QFrame.Raised)
+ self.wholeFrame.setObjectName("wholeFrame")
+ self.reloadBtn = QtWidgets.QPushButton(self.wholeFrame)
+ self.reloadBtn.setGeometry(QtCore.QRect(520, 110, 81, 28))
+ font = QtGui.QFont()
font.setPointSize(11)
self.reloadBtn.setFont(font)
- self.window_list = QComboBox(self.wholeFrame)
- self.window_list.setObjectName(u"window_list")
- self.window_list.setGeometry(QRect(9, 112, 501, 21))
- self.timeFrame = QFrame(self.wholeFrame)
- self.timeFrame.setObjectName(u"timeFrame")
- self.timeFrame.setGeometry(QRect(250, 16, 151, 31))
- self.timeFrame.setFrameShape(QFrame.Box)
- self.timeFrame.setFrameShadow(QFrame.Raised)
- self.sec = QLabel(self.timeFrame)
- self.sec.setObjectName(u"sec")
- self.sec.setGeometry(QRect(74, 1, 61, 31))
- self.trans_time = QLabel(self.timeFrame)
- self.trans_time.setObjectName(u"trans_time")
- self.trans_time.setGeometry(QRect(13, 1, 81, 31))
- self.frame = QFrame(self.wholeFrame)
- self.frame.setObjectName(u"frame")
- self.frame.setGeometry(QRect(250, 63, 151, 31))
- self.frame.setFrameShape(QFrame.Box)
- self.frame.setFrameShadow(QFrame.Raised)
- self.show_status = QLabel(self.frame)
- self.show_status.setObjectName(u"show_status")
- self.show_status.setGeometry(QRect(46, 6, 101, 20))
- self.status_lbl = QLabel(self.frame)
- self.status_lbl.setObjectName(u"status_lbl")
- self.status_lbl.setGeometry(QRect(13, 8, 51, 16))
- self.btnFrame = QFrame(self.wholeFrame)
- self.btnFrame.setObjectName(u"btnFrame")
- self.btnFrame.setGeometry(QRect(10, 10, 231, 91))
- self.btnFrame.setFrameShape(QFrame.Box)
- self.btnFrame.setFrameShadow(QFrame.Raised)
- self.show_ori_btn = QPushButton(self.btnFrame)
- self.show_ori_btn.setObjectName(u"show_ori_btn")
- self.show_ori_btn.setGeometry(QRect(90, 5, 71, 31))
- font1 = QFont()
- font1.setFamily(u"Consolas")
- font1.setPointSize(10)
- font1.setBold(False)
- font1.setWeight(50)
- self.show_ori_btn.setFont(font1)
- self.show_trans_btn = QPushButton(self.btnFrame)
- self.show_trans_btn.setObjectName(u"show_trans_btn")
- self.show_trans_btn.setGeometry(QRect(7, 5, 81, 31))
- self.show_trans_btn.setFont(font1)
- self.stop_trans_btn = QPushButton(self.btnFrame)
- self.stop_trans_btn.setObjectName(u"stop_trans_btn")
- self.stop_trans_btn.setGeometry(QRect(163, 5, 61, 31))
- font2 = QFont()
- font2.setPointSize(10)
- self.stop_trans_btn.setFont(font2)
- self.isPrintBoth = QCheckBox(self.btnFrame)
- self.isPrintBoth.setObjectName(u"isPrintBoth")
- self.isPrintBoth.setGeometry(QRect(10, 37, 151, 19))
- self.isPrintBoth.setFont(font2)
- self.isAutoTrans = QCheckBox(self.btnFrame)
- self.isAutoTrans.setObjectName(u"isAutoTrans")
- self.isAutoTrans.setGeometry(QRect(10, 54, 211, 19))
- self.isAutoTrans.setFont(font2)
- self.isPrintLog = QCheckBox(self.btnFrame)
- self.isPrintLog.setObjectName(u"isPrintLog")
- self.isPrintLog.setGeometry(QRect(10, 71, 211, 19))
- self.isPrintLog.setFont(font2)
- self.authorFrame = QFrame(self.wholeFrame)
- self.authorFrame.setObjectName(u"authorFrame")
- self.authorFrame.setGeometry(QRect(410, 10, 201, 91))
- self.authorFrame.setFrameShape(QFrame.Box)
- self.authorFrame.setFrameShadow(QFrame.Raised)
- self.dev_info = QLabel(self.authorFrame)
- self.dev_info.setObjectName(u"dev_info")
- self.dev_info.setGeometry(QRect(100, 10, 81, 71))
- self.dev_info.setFrameShape(QFrame.NoFrame)
- self.go_dev_page = QPushButton(self.authorFrame)
- self.go_dev_page.setObjectName(u"go_dev_page")
- self.go_dev_page.setGeometry(QRect(7, 5, 75, 81))
+ self.reloadBtn.setObjectName("reloadBtn")
+ self.window_list = QtWidgets.QComboBox(self.wholeFrame)
+ self.window_list.setGeometry(QtCore.QRect(9, 112, 501, 21))
+ self.window_list.setObjectName("window_list")
+ self.timeFrame = QtWidgets.QFrame(self.wholeFrame)
+ self.timeFrame.setGeometry(QtCore.QRect(430, 16, 171, 31))
+ self.timeFrame.setFrameShape(QtWidgets.QFrame.Box)
+ self.timeFrame.setFrameShadow(QtWidgets.QFrame.Raised)
+ self.timeFrame.setObjectName("timeFrame")
+ self.sec = QtWidgets.QLabel(self.timeFrame)
+ self.sec.setGeometry(QtCore.QRect(74, 1, 61, 31))
+ self.sec.setText("")
+ self.sec.setObjectName("sec")
+ self.trans_time = QtWidgets.QLabel(self.timeFrame)
+ self.trans_time.setGeometry(QtCore.QRect(13, 1, 81, 31))
+ self.trans_time.setObjectName("trans_time")
+ self.status_frame = QtWidgets.QFrame(self.wholeFrame)
+ self.status_frame.setGeometry(QtCore.QRect(430, 63, 171, 31))
+ self.status_frame.setFrameShape(QtWidgets.QFrame.Box)
+ self.status_frame.setFrameShadow(QtWidgets.QFrame.Raised)
+ self.status_frame.setObjectName("status_frame")
+ self.show_status = QtWidgets.QLabel(self.status_frame)
+ self.show_status.setGeometry(QtCore.QRect(46, 6, 101, 20))
+ self.show_status.setText("")
+ self.show_status.setObjectName("show_status")
+ self.status_lbl = QtWidgets.QLabel(self.status_frame)
+ self.status_lbl.setGeometry(QtCore.QRect(13, 8, 51, 16))
+ self.status_lbl.setObjectName("status_lbl")
+ self.btnFrame = QtWidgets.QFrame(self.wholeFrame)
+ self.btnFrame.setGeometry(QtCore.QRect(10, 10, 231, 91))
+ self.btnFrame.setFrameShape(QtWidgets.QFrame.Box)
+ self.btnFrame.setFrameShadow(QtWidgets.QFrame.Raised)
+ self.btnFrame.setObjectName("btnFrame")
+ self.show_ori_btn = QtWidgets.QPushButton(self.btnFrame)
+ self.show_ori_btn.setGeometry(QtCore.QRect(90, 5, 71, 31))
+ font = QtGui.QFont()
+ font.setFamily("Consolas")
+ font.setPointSize(10)
+ font.setBold(False)
+ font.setWeight(50)
+ self.show_ori_btn.setFont(font)
+ self.show_ori_btn.setObjectName("show_ori_btn")
+ self.show_trans_btn = QtWidgets.QPushButton(self.btnFrame)
+ self.show_trans_btn.setGeometry(QtCore.QRect(7, 5, 81, 31))
+ font = QtGui.QFont()
+ font.setFamily("Consolas")
+ font.setPointSize(10)
+ font.setBold(False)
+ font.setWeight(50)
+ self.show_trans_btn.setFont(font)
+ self.show_trans_btn.setObjectName("show_trans_btn")
+ self.stop_trans_btn = QtWidgets.QPushButton(self.btnFrame)
+ self.stop_trans_btn.setGeometry(QtCore.QRect(163, 5, 61, 31))
+ font = QtGui.QFont()
+ font.setPointSize(10)
+ self.stop_trans_btn.setFont(font)
+ self.stop_trans_btn.setObjectName("stop_trans_btn")
+ self.isPrintBoth = QtWidgets.QCheckBox(self.btnFrame)
+ self.isPrintBoth.setGeometry(QtCore.QRect(10, 37, 151, 19))
+ font = QtGui.QFont()
+ font.setPointSize(10)
+ self.isPrintBoth.setFont(font)
+ self.isPrintBoth.setObjectName("isPrintBoth")
+ self.isAutoTrans = QtWidgets.QCheckBox(self.btnFrame)
+ self.isAutoTrans.setGeometry(QtCore.QRect(10, 54, 211, 19))
+ font = QtGui.QFont()
+ font.setPointSize(10)
+ self.isAutoTrans.setFont(font)
+ self.isAutoTrans.setObjectName("isAutoTrans")
+ self.isPrintLog = QtWidgets.QCheckBox(self.btnFrame)
+ self.isPrintLog.setGeometry(QtCore.QRect(10, 71, 211, 19))
+ font = QtGui.QFont()
+ font.setPointSize(10)
+ self.isPrintLog.setFont(font)
+ self.isPrintLog.setObjectName("isPrintLog")
+ self.authorFrame = QtWidgets.QFrame(self.wholeFrame)
+ self.authorFrame.setGeometry(QtCore.QRect(250, 10, 171, 91))
+ self.authorFrame.setFrameShape(QtWidgets.QFrame.Box)
+ self.authorFrame.setFrameShadow(QtWidgets.QFrame.Raised)
+ self.authorFrame.setObjectName("authorFrame")
+ self.dev_info = QtWidgets.QLabel(self.authorFrame)
+ self.dev_info.setGeometry(QtCore.QRect(95, 10, 61, 71))
+ self.dev_info.setFrameShape(QtWidgets.QFrame.NoFrame)
+ self.dev_info.setObjectName("dev_info")
+ self.go_dev_page = QtWidgets.QPushButton(self.authorFrame)
+ self.go_dev_page.setGeometry(QtCore.QRect(7, 5, 75, 81))
+ self.go_dev_page.setObjectName("go_dev_page")
+ self.log_browser = QtWidgets.QTextBrowser(self.centralwidget)
+ self.log_browser.setGeometry(QtCore.QRect(10, 180, 611, 201))
+ self.log_browser.setObjectName("log_browser")
MainWindow.setCentralWidget(self.centralwidget)
- self.statusbar = QStatusBar(MainWindow)
- self.statusbar.setObjectName(u"statusbar")
+ self.statusbar = QtWidgets.QStatusBar(MainWindow)
+ self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
-
- QMetaObject.connectSlotsByName(MainWindow)
- # setupUi
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
- MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Ehnd \uc6f9 \ubc88\uc5ed", None))
- self.reloadBtn.setText(QCoreApplication.translate("MainWindow", u"\ub9ac\ub85c\ub4dc", None))
- self.sec.setText("")
- self.trans_time.setText(QCoreApplication.translate("MainWindow", u"\ubc88\uc5ed \uc2dc\uac04:", None))
- self.show_status.setText("")
- self.status_lbl.setText(QCoreApplication.translate("MainWindow", u"\uc0c1\ud0dc: ", None))
- self.show_ori_btn.setText(QCoreApplication.translate("MainWindow", u"\uc6d0\ubcf8 \ubcf4\uae30", None))
- self.show_trans_btn.setText(QCoreApplication.translate("MainWindow", u"\ubc88\uc5ed\ubcf8 \ubcf4\uae30", None))
- self.stop_trans_btn.setText(QCoreApplication.translate("MainWindow", u"\ubc88\uc5ed \uc911\uc9c0", None))
- self.isPrintBoth.setText(QCoreApplication.translate("MainWindow", u"\uc6d0\ubb38/\ubc88\uc5ed\ubb38 \ub3d9\uc2dc \ucd9c\ub825", None))
- self.isAutoTrans.setText(QCoreApplication.translate("MainWindow", u"\ud398\uc774\uc9c0 \ubc14\ub014 \ub54c\ub9c8\ub2e4 \uc790\ub3d9 \ubc88\uc5ed", None))
- self.isPrintLog.setText(QCoreApplication.translate("MainWindow", u"\ubc88\uc5ed \ub85c\uadf8 \ucd9c\ub825", None))
- self.dev_info.setText(QCoreApplication.translate("MainWindow", u"\uc81c\uc791\uc790: kdr \n"
-" V.210420", None))
- self.go_dev_page.setText(QCoreApplication.translate("MainWindow", u"\uc81c\uc791\uc790\n"
-"\ud648\ud398\uc774\uc9c0", None))
- # retranslateUi
-
-if __name__ == "__main__":
- import sys
- app = QApplication(sys.argv)
- form = QMainWindow()
- ui = Ui_MainWindow()
- ui.setupUi(form)
- form.show()
- sys.exit(app.exec_())
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "Ehnd 웹 번역"))
+ self.reloadBtn.setText(_translate("MainWindow", "리로드"))
+ self.trans_time.setText(_translate("MainWindow", "번역 시간:"))
+ self.status_lbl.setText(_translate("MainWindow", "상태: "))
+ self.show_ori_btn.setText(_translate("MainWindow", "원본 보기"))
+ self.show_trans_btn.setText(_translate("MainWindow", "번역본 보기"))
+ self.stop_trans_btn.setText(_translate("MainWindow", "번역 중지"))
+ self.isPrintBoth.setText(_translate("MainWindow", "원문/번역문 동시 출력"))
+ self.isAutoTrans.setText(_translate("MainWindow", "페이지 바뀔 때마다 자동 번역"))
+ self.isPrintLog.setText(_translate("MainWindow", "번역 로그 출력"))
+ self.dev_info.setText(_translate("MainWindow", "제작자: kdr \n"
+" V.210420"))
+ self.go_dev_page.setText(_translate("MainWindow", "제작자\n"
+"홈페이지"))
diff --git a/UI_MAIN.ui b/UI_MAIN.ui
index f087d31..1c59b32 100644
--- a/UI_MAIN.ui
+++ b/UI_MAIN.ui
@@ -9,8 +9,8 @@
0
0
- 649
- 198
+ 635
+ 416
@@ -34,7 +34,7 @@
9
10
- 621
+ 611
151
@@ -49,7 +49,7 @@
520
110
- 91
+ 81
28
@@ -75,9 +75,9 @@
- 250
+ 430
16
- 151
+ 171
31
@@ -114,12 +114,12 @@
-
+
- 250
+ 430
63
- 151
+ 171
31
@@ -289,9 +289,9 @@
- 410
+ 250
10
- 201
+ 171
91
@@ -304,9 +304,9 @@
- 100
+ 95
10
- 81
+ 61
71
@@ -334,6 +334,16 @@
+
+
+
+ 10
+ 180
+ 611
+ 201
+
+
+
diff --git a/__pycache__/UI_MAIN.cpython-37.pyc b/__pycache__/UI_MAIN.cpython-37.pyc
index a961669..cdbcf53 100644
Binary files a/__pycache__/UI_MAIN.cpython-37.pyc and b/__pycache__/UI_MAIN.cpython-37.pyc differ
diff --git a/__pycache__/ehnd_web_translate.cpython-37.pyc b/__pycache__/ehnd_web_translate.cpython-37.pyc
index ebdedf1..1660744 100644
Binary files a/__pycache__/ehnd_web_translate.cpython-37.pyc and b/__pycache__/ehnd_web_translate.cpython-37.pyc differ
diff --git a/comp.json b/comp.json
index d3346c7..72b12e8 100644
--- a/comp.json
+++ b/comp.json
@@ -1 +1 @@
-{"command_data":{"onefile":true,"console":true,"additional_files":{}},"id_injectable":{"file":"C:/Users/power/Desktop/Project/Dev/EhndWebTranslate/ehnd_web_translate.py","icon":"C:/Users/power/Desktop/Project/Dev/EhndWebTranslate/.ico","output_location":"","VALUE--upx-dir":"","VALUE--log-level":"","VALUE-n":"","VALUE--add-binary":"","VALUE-p":"","COMMASPLIT--hidden-import":"","VALUE--additional-hooks-dir":"","VALUE--runtime-hook":"","COMMASPLIT--exclude-module":"","VALUE--key":"","VALUE--debug":"","VALUE--version-file":"","VALUE-m":"","VALUE-r":"","VALUE--osx-bundle-identifier":"","VALUE--runtime-tmpdir":"","extra_command_data":""},"switches":{"disable_recursion_limit":false,"OPTION-a":false,"OPTION--clean":false,"OPTION-s":false,"OPTION--noupx":false,"OPTION--uac-admin":false,"OPTION--uac-uiaccess":false,"OPTION--win-private-assemblies":false,"OPTION--win-no-prefer-redirects":false,"OPTION--bootloader-ignore-signals":false}}
\ No newline at end of file
+{"command_data":{"onefile":true,"console":false,"additional_files":{}},"id_injectable":{"file":"C:/Users/power/Desktop/Project/Dev/EhndWebTranslate/ehnd_web_translate.pyw","icon":"C:/Users/power/Desktop/Project/Dev/EhndWebTranslate/sayo.ico","output_location":"","VALUE--upx-dir":"","VALUE--log-level":"","VALUE-n":"","VALUE--add-binary":"","VALUE-p":"","COMMASPLIT--hidden-import":"","VALUE--additional-hooks-dir":"","VALUE--runtime-hook":"","COMMASPLIT--exclude-module":"","VALUE--key":"","VALUE--debug":"","VALUE--version-file":"","VALUE-m":"","VALUE-r":"","VALUE--osx-bundle-identifier":"","VALUE--runtime-tmpdir":"","extra_command_data":""},"switches":{"disable_recursion_limit":false,"OPTION-a":false,"OPTION--clean":false,"OPTION-s":false,"OPTION--noupx":false,"OPTION--uac-admin":false,"OPTION--uac-uiaccess":false,"OPTION--win-private-assemblies":false,"OPTION--win-no-prefer-redirects":false,"OPTION--bootloader-ignore-signals":false}}
\ No newline at end of file
diff --git a/ehnd_web_translate.py b/ehnd_web_translate.pyw
similarity index 74%
rename from ehnd_web_translate.py
rename to ehnd_web_translate.pyw
index e67ee8b..bc5629f 100644
--- a/ehnd_web_translate.py
+++ b/ehnd_web_translate.pyw
@@ -4,16 +4,18 @@
from module._translate_j2k import t_j2k
from module._requirement_func import *
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
+from PyQt5.QtWidgets import *
import chromedriver_autoinstaller
-from selenium import webdriver
-from selenium.webdriver.common.keys import Keys
+
+from selenium.webdriver import Chrome
+from selenium.webdriver.chrome.options import Options
from selenium.common import exceptions
+from selenium.webdriver.chrome.service import Service as ChromeService
-import threading
+from subprocess import CREATE_NO_WINDOW
import asyncio
@@ -31,6 +33,7 @@ def async_loop(func, *args):
+
class LoadDriverWindow(QThread):
def __init__(self, window):
QThread.__init__(self)
@@ -47,6 +50,7 @@ def run(self):
self.window.window_list.addItem(self.window.driver.title)
self.window.driver.switch_to.window(cwh)
+ # self.window.log_browser.append("LoadDriverWindow")
@@ -141,15 +145,14 @@ async def runTrans(self, i):
k = t_j2k(japanese=ih)
if self.window.isPrintBoth.isChecked():
# k = f"{ih}({k})"
- k = f"{ih}{k}"
+ k = f"{ih}
{k}"
modified_html.append(k)
- if self.window.isPrintLog.isChecked():
- print("번역O -> ", ih)
+ self.window.printLog(f"번역O -> {ih}")
else:
modified_html.append(ih)
- if self.window.isPrintLog.isChecked():
- print("번역X -> ", ih)
+ self.window.printLog(f"번역X -> {ih}")
+
ih_elements = ''.join(modified_html)
@@ -158,8 +161,8 @@ async def runTrans(self, i):
except exceptions.StaleElementReferenceException:
- if self.window.isPrintLog.isChecked():
- print("StaleElementRefernceException")
+ # self.window.printLog("StaleElementRefernceException")
+ pass
async def rt(self, a):
@@ -174,36 +177,34 @@ def __init__(self):
super().__init__()
self.lastUrl = ""
+
+
+
+ options = Options()
+ options.add_experimental_option("excludeSwitches" , ["enable-automation", "load-extension", "enable-logging"])
+
+ # self.driver = Chrome(executable_path='./89/chromedriver.exe',options=options)
- options = webdriver.ChromeOptions()
- options.add_argument("disable-gpu")
- options.add_argument("disable-infobars")
- options.add_argument("--disable-extensions")
- options.add_experimental_option('excludeSwitches', ['enable-logging'])
- # prefs = \
- # {
- # 'profile.default_content_setting_values':
- # {
- # 'cookies' : 2, 'images': 2, 'plugins' : 2, 'popups': 2, 'geolocation': 2, 'notifications' : 2, 'auto_select_certificate': 2, 'fullscreen' : 2, 'mouselock' : 2, 'mixed_script': 2, 'media_stream' : 2, 'media_stream_mic' : 2, 'media_stream_camera': 2, 'protocol_handlers' : 2, 'ppapi_broker' : 2, 'automatic_downloads': 2, 'midi_sysex' : 2, 'push_messaging' : 2, 'ssl_cert_decisions': 2, 'metro_switch_to_desktop' : 2, 'protected_media_identifier': 2, 'app_banner': 2, 'site_engagement' : 2, 'durable_storage' : 2
- # }
- # }
- # options.add_experimental_option('prefs', prefs)
-
- # self.driver = webdriver.Chrome(executable_path='./89/chromedriver.exe',options=options)
-
- chromedriver_autoinstaller.install('./')
- self.driver = webdriver.Chrome(options=options)
+ path = chromedriver_autoinstaller.install('./')
+ chrome_service = ChromeService(path)
+ chrome_service.creationflags = CREATE_NO_WINDOW
+
+
+ self.driver = Chrome(options=options, service=chrome_service)
+
self.driver.get("https://www.google.com")
self.setupUi(self)
- QObject.connect(self.show_trans_btn, SIGNAL('clicked()'), self.showTrans)
- QObject.connect(self.show_ori_btn, SIGNAL('clicked()'), self.showOri)
- QObject.connect(self.go_dev_page, SIGNAL('clicked()'), self.goDevPage)
- QObject.connect(self.reloadBtn, SIGNAL('clicked()'), self.reloadWindow)
- QObject.connect(self.stop_trans_btn, SIGNAL('clicked()'), self.stopTrans)
+
+ self.show_trans_btn.clicked.connect(self.showTrans)
+ self.show_ori_btn.clicked.connect(self.showOri)
+ self.go_dev_page.clicked.connect(self.goDevPage)
+ self.reloadBtn.clicked.connect(self.reloadWindow)
+ self.stop_trans_btn.clicked.connect(self.stopTrans)
self.window_list.currentIndexChanged.connect(self.setWindow)
self.isAutoTrans.stateChanged.connect(self.autoTrans)
+
self.st = TransThread(self, isTrans=True)
self.so = TransThread(self, isTrans=False)
@@ -230,7 +231,7 @@ def showOri(self):
def goDevPage(self):
- open_new('https://blog.naver.com/powerapollon')
+ open_new('https://blog.naver.com/PostList.nhn?blogId=powerapollon&categoryNo=33&from=postList')
def reloadWindow(self):
@@ -250,6 +251,11 @@ def autoTrans(self):
+ def printLog(self, msg):
+ if self.isPrintLog.isChecked():
+ self.log_browser.append(msg)
+ self.log_browser.verticalScrollBar().setValue(self.log_browser.verticalScrollBar().maximum())
+
def btnSetting(self, setNum):
if setNum == 0:
diff --git a/module/__pycache__/_requirement_func.cpython-37.pyc b/module/__pycache__/_requirement_func.cpython-37.pyc
index 5fda887..439f59d 100644
Binary files a/module/__pycache__/_requirement_func.cpython-37.pyc and b/module/__pycache__/_requirement_func.cpython-37.pyc differ
diff --git a/module/_requirement_func.py b/module/_requirement_func.py
index c83c8ee..928abec 100644
--- a/module/_requirement_func.py
+++ b/module/_requirement_func.py
@@ -9,6 +9,7 @@
from pprint import pprint
+
def WriteFile(text: str, filename: str):
f = codecs.open(filename, mode='w', encoding='utf-8')
f.write(u'{}'.format(text))
diff --git "a/\354\202\254\354\232\224.ico" b/sayo.ico
similarity index 100%
rename from "\354\202\254\354\232\224.ico"
rename to sayo.ico
diff --git a/uitopy.bat b/uitopy.bat
index 5d28b38..c187d5d 100644
--- a/uitopy.bat
+++ b/uitopy.bat
@@ -1,12 +1 @@
-pyside2-uic.exe .\UI_MAIN.ui -o .\UI_MAIN.py
-
-
-
-echo if __name__ == "__main__": >> UI_MAIN.py
-echo import sys >> UI_MAIN.py
-echo app = QApplication(sys.argv) >> UI_MAIN.py
-echo form = QMainWindow() >> UI_MAIN.py
-echo ui = Ui_MainWindow() >> UI_MAIN.py
-echo ui.setupUi(form) >> UI_MAIN.py
-echo form.show() >> UI_MAIN.py
-echo sys.exit(app.exec_()) >> UI_MAIN.py
+pyuic5.exe .\UI_MAIN.ui -o .\UI_MAIN.py
\ No newline at end of file