-
Notifications
You must be signed in to change notification settings - Fork 3
/
graphicCMS.py
executable file
·447 lines (389 loc) · 22.6 KB
/
graphicCMS.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'graphicCMS.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# 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 PyQt5 import QtCore, QtGui, QtWidgets
dialog_style_sheet = "background-color: rgb(45, 45, 45);\n""color: rgb(211, 211, 211);\n""font: 11pt \"Ubuntu Mono\";" \
"font-weight: bold"
table_view_style_sheet = "background-color: rgb(70, 70, 70);\n"
green_button_style_sheet = "background-color: rgb(71, 141, 75);\n""color: rgb(45, 45, 45);\n" \
"border-color: rgb(0, 80, 0);"
red_button_style_sheet = "background-color: rgb(170, 16, 16);\n""color: rgb(45, 45, 45);\n" \
"border-color: rgb(80, 0, 0);"
blue_button_style_sheet = "background-color: rgb(77, 84, 176);\n""color: rgb(45, 45, 45);\n" \
"border-color: rgb(0, 0, 80);"
_MAXVALUE_ = 999999999
SCREEN_HEIGHT = 0
SCREEN_WIDTH = 0
preference_lbl_min_size = QtCore.QSize(int(SCREEN_WIDTH / 5.8), 20)
preference_spinbox_min_size = QtCore.QSize(int(SCREEN_WIDTH / 5.8), 20)
class UIpreferences(object):
def __init__(self):
self.find_top_sellers_file_name = None
self.grid_layout_top_sellers_right = None
self.grid_layout_top_sellers_left = None
self.grid_layout_top_sellers = None
self.add_btn = None
self.button_gridlayout_4 = None
self.cancel_btn = None
self.check_proxy_file_check_box = None
self.grid_layout_3 = None
self.grid_layout_t_i = None
self.grid_layout_proxy_check = None
self.grid_layout_proxy_needed = None
self.grid_layout_use_proxy_file = None
self.grid_layout_use_proxy_file_2 = None
self.in_title_1 = None
self.n_threads = None
self.n_threads_lbl = None
self.n_proxy = None
self.n_proxy_lbl = None
self.n_proxy_threads = None
self.n_proxy_threads_lbl = None
self.use_proxy_file = None
self.use_proxy_file_check_box = None
self.use_proxy_file_lbl = None
self.find_top_sellers_lbl = None
self.find_top_sellers_check_box = None
self.find_top_sellers_number = None
self.vertical_layout = None
def setup_ui(self, preferences):
preferences.setObjectName("preferences")
preferences.resize(int(SCREEN_WIDTH / 2.7), int(SCREEN_HEIGHT / 4.8))
preferences.setFixedSize(int(SCREEN_WIDTH / 2.7), int(SCREEN_HEIGHT / 3.5))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
preferences.setSizePolicy(sizePolicy)
self.vertical_layout = QtWidgets.QVBoxLayout(preferences)
self.vertical_layout.setObjectName("vertical_layout")
# Title
self.grid_layout_t_i = QtWidgets.QGridLayout()
self.grid_layout_t_i.setObjectName('grid_layout_t_i')
self.in_title_1 = QtWidgets.QLabel(preferences)
self.in_title_1.setMinimumSize(preference_lbl_min_size)
self.in_title_1.setBaseSize(preference_lbl_min_size)
self.in_title_1.setObjectName("in_title_1")
self.grid_layout_t_i.addWidget(self.in_title_1, 0, 0, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_t_i)
# Number of Top sellers to scrape
self.grid_layout_top_sellers = QtWidgets.QGridLayout()
self.grid_layout_top_sellers_left = QtWidgets.QGridLayout()
self.grid_layout_top_sellers_right = QtWidgets.QGridLayout()
self.grid_layout_top_sellers.setObjectName('grid_layout_top_sellers')
self.find_top_sellers_lbl = QtWidgets.QLabel(preferences)
self.find_top_sellers_lbl.setMinimumSize(preference_lbl_min_size)
self.find_top_sellers_lbl.setObjectName('find_top_sellers_lbl')
self.grid_layout_top_sellers_left.addWidget(self.find_top_sellers_lbl, 0, 1, 1, 1)
self.find_top_sellers_check_box = QtWidgets.QCheckBox("Find top sellers")
self.find_top_sellers_check_box.setMinimumSize(preference_lbl_min_size)
self.find_top_sellers_check_box.setObjectName('find_top_sellers_check_box')
self.grid_layout_top_sellers_left.addWidget(self.find_top_sellers_check_box, 0, 0, 1, 1)
self.find_top_sellers_number = QtWidgets.QSpinBox(preferences)
self.find_top_sellers_number.setMinimumSize(preference_spinbox_min_size)
self.find_top_sellers_number.setBaseSize(preference_spinbox_min_size)
self.find_top_sellers_number.setObjectName('find_top_sellers_number')
self.find_top_sellers_number.setMaximum(50) # without modifying page, by default there are 50 sellers shown
self.grid_layout_top_sellers_right.addWidget(self.find_top_sellers_number, 0, 0, 1, 1)
self.find_top_sellers_file_name = QtWidgets.QLineEdit(preferences)
self.find_top_sellers_file_name.setMinimumSize(preference_spinbox_min_size)
self.find_top_sellers_file_name.setBaseSize(preference_spinbox_min_size)
self.find_top_sellers_file_name.setObjectName('find_top_sellers_file_name')
self.find_top_sellers_file_name.setPlaceholderText("name of file");
self.grid_layout_top_sellers_right.addWidget(self.find_top_sellers_file_name, 0, 1, 1, 1)
self.grid_layout_top_sellers.addLayout(self.grid_layout_top_sellers_left, 0, 0, 1, 1)
self.grid_layout_top_sellers.addLayout(self.grid_layout_top_sellers_right, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_top_sellers)
# Number of Threads in scraping
self.grid_layout_3 = QtWidgets.QGridLayout()
self.grid_layout_3.setObjectName('grid_layout_3')
self.n_threads_lbl = QtWidgets.QLabel(preferences)
self.n_threads_lbl.setMinimumSize(preference_lbl_min_size)
self.n_threads_lbl.setObjectName('n_threads_lbl')
self.grid_layout_3.addWidget(self.n_threads_lbl, 0, 0, 1, 1)
self.n_threads = QtWidgets.QSpinBox(preferences)
self.n_threads.setMinimumSize(preference_spinbox_min_size)
self.n_threads.setBaseSize(preference_spinbox_min_size)
self.n_threads.setObjectName('n_threads')
self.n_threads.setMaximum(_MAXVALUE_)
self.grid_layout_3.addWidget(self.n_threads, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_3)
# Number of Threads in proxyChecking
self.grid_layout_proxy_check = QtWidgets.QGridLayout()
self.grid_layout_proxy_check.setObjectName('grid_layout_proxy_check')
self.n_proxy_threads_lbl = QtWidgets.QLabel(preferences)
self.n_proxy_threads_lbl.setMinimumSize(preference_lbl_min_size)
self.n_proxy_threads_lbl.setObjectName('n_proxy_threads_lbl')
self.grid_layout_proxy_check.addWidget(self.n_proxy_threads_lbl, 0, 0, 1, 1)
self.n_proxy_threads = QtWidgets.QSpinBox(preferences)
self.n_proxy_threads.setMinimumSize(preference_spinbox_min_size)
self.n_proxy_threads.setBaseSize(preference_spinbox_min_size)
self.n_proxy_threads.setObjectName('n_proxy_threads')
self.grid_layout_proxy_check.addWidget(self.n_proxy_threads, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_proxy_check)
# Number of Proxies needed
self.grid_layout_proxy_needed = QtWidgets.QGridLayout()
self.grid_layout_proxy_needed.setObjectName('grid_layout_proxy_needed')
self.n_proxy_lbl = QtWidgets.QLabel(preferences)
self.n_proxy_lbl.setMinimumSize(preference_lbl_min_size)
self.n_proxy_lbl.setObjectName('n_proxy_lbl')
self.grid_layout_proxy_needed.addWidget(self.n_proxy_lbl, 0, 0, 1, 1)
self.n_proxy = QtWidgets.QSpinBox(preferences)
self.n_proxy.setMinimumSize(preference_spinbox_min_size)
self.n_proxy.setBaseSize(preference_spinbox_min_size)
self.n_proxy.setObjectName('n_proxy')
self.grid_layout_proxy_needed.addWidget(self.n_proxy, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_proxy_needed)
# Using a proxy_file
self.grid_layout_use_proxy_file = QtWidgets.QGridLayout()
self.grid_layout_use_proxy_file.setObjectName('grid_layout_use_proxy_file')
self.use_proxy_file_lbl = QtWidgets.QLabel(preferences)
self.use_proxy_file_lbl.setMinimumSize(preference_lbl_min_size)
self.use_proxy_file_lbl.setObjectName('use_proxy_file_lbl')
self.grid_layout_use_proxy_file.addWidget(self.use_proxy_file_lbl, 0, 0, 1, 1)
self.use_proxy_file = QtWidgets.QLineEdit(preferences)
self.use_proxy_file.setMinimumSize(preference_spinbox_min_size)
self.use_proxy_file.setObjectName('use_proxy_file')
self.grid_layout_use_proxy_file.addWidget(self.use_proxy_file, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_use_proxy_file)
# Using Proxyfile - checkboxes
self.grid_layout_use_proxy_file_2 = QtWidgets.QGridLayout()
self.grid_layout_use_proxy_file_2.setObjectName('grid_layout_use_proxy_file_2')
self.use_proxy_file_check_box = QtWidgets.QCheckBox("Use proxy file")
self.use_proxy_file_check_box.setMinimumSize(preference_lbl_min_size)
self.use_proxy_file_check_box.setObjectName('use_proxy_file_check_box')
self.grid_layout_use_proxy_file_2.addWidget(self.use_proxy_file_check_box, 0, 0, 1, 1)
self.check_proxy_file_check_box = QtWidgets.QCheckBox("Check proxy file")
self.check_proxy_file_check_box.setMinimumSize(preference_lbl_min_size)
self.check_proxy_file_check_box.setObjectName('check_proxy_file_check_box')
self.grid_layout_use_proxy_file_2.addWidget(self.check_proxy_file_check_box, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.grid_layout_use_proxy_file_2)
# Buttons
self.button_gridlayout_4 = QtWidgets.QGridLayout()
self.button_gridlayout_4.setObjectName("button_gridlayout_4")
self.cancel_btn = QtWidgets.QPushButton(preferences)
self.cancel_btn.setMinimumSize(QtCore.QSize(80, 0))
self.cancel_btn.setObjectName("cancel_btn")
self.cancel_btn.setStyleSheet(red_button_style_sheet)
self.button_gridlayout_4.addWidget(self.cancel_btn, 0, 0, 1, 1)
self.add_btn = QtWidgets.QPushButton(preferences)
self.add_btn.setMinimumSize(QtCore.QSize(80, 0))
self.add_btn.setObjectName("add_btn")
self.add_btn.setStyleSheet(green_button_style_sheet)
self.button_gridlayout_4.addWidget(self.add_btn, 0, 1, 1, 1)
self.vertical_layout.addLayout(self.button_gridlayout_4)
self.retranslate_ui(preferences)
QtCore.QMetaObject.connectSlotsByName(preferences)
total_height = self.vertical_layout.sizeHint().height()
num_lines = self.vertical_layout.count()
spacing = (self.height() - total_height) // (num_lines + 1)
self.vertical_layout.setSpacing(spacing)
def retranslate_ui(self, preferences):
_translate = QtCore.QCoreApplication.translate
preferences.setWindowTitle(_translate("preferences", "preferences"))
self.in_title_1.setText(_translate("preferences", "preferences :"))
self.n_proxy_threads_lbl.setText(_translate("preferences", "Number of Threads in ProxyCheck"))
self.use_proxy_file_lbl.setText(_translate("preferences", "Use a file containing proxies"))
self.n_proxy_lbl.setText(_translate("preferences", "Number of Proxies"))
self.n_threads_lbl.setText(_translate("preferences", "Number of Threads"))
self.cancel_btn.setText(_translate("preferences", "CANCEL"))
self.add_btn.setText(_translate("preferences", "SAVE CHANGES"))
self.find_top_sellers_lbl.setText(_translate("preferences", "Number of top sellers :"))
def get_parameters(self):
out = [self.n_proxy_threads.value(), self.n_proxy.value(), self.n_threads.value(), self.use_proxy_file.text(),
self.use_proxy_file_check_box.isChecked(), self.check_proxy_file_check_box.isChecked(),
self.find_top_sellers_check_box.isChecked(), self.find_top_sellers_number.value(), self.find_top_sellers_file_name.text()]
return out
def set_parameters(self, n_proxy_threads, n_proxy_val, n_threads_val, proxy_file_path, use_proxy_file_chk,
check_proxy_file_chk, check_top_seller_chk, n_top_sellers_val, find_top_sellers_file_name):
self.n_proxy_threads.setValue(n_proxy_threads)
self.n_proxy.setValue(n_proxy_val)
self.n_threads.setValue(n_threads_val)
self.use_proxy_file.setText(proxy_file_path)
self.use_proxy_file_check_box.setChecked(use_proxy_file_chk)
self.check_proxy_file_check_box.setChecked(check_proxy_file_chk)
self.find_top_sellers_check_box.setChecked(check_top_seller_chk)
self.find_top_sellers_number.setValue(n_top_sellers_val)
self.find_top_sellers_file_name.setText(find_top_sellers_file_name)
class UiMainWindow(object):
def __init__(self):
self.action_hello = None
self.console_lbl = None
self.console_disp = None
self.console_layout = None
self.progress_bar = None
self.chosen_out_lbl = None
self.chosen_stat_lbl = None
self.chosen_file_lbl = None
self.vertical_layout_2 = None
self.run_btn = None
self.output_btn = None
self.stat_btn = None
self.vertical_layout = None
self.horizontal_layout = None
self.proxy_btn = None
self.vertical_layout_prox = None
self.grid_layout = None
self.central_widget = None
self.input_btn = None
def setupUi(self, main_window):
main_window.setObjectName("main_window")
sizeObject = QtWidgets.QDesktopWidget().screenGeometry(-1)
global SCREEN_HEIGHT
global SCREEN_WIDTH
SCREEN_HEIGHT = int(sizeObject.height())
SCREEN_WIDTH = int(sizeObject.width())
main_window.resize(int(SCREEN_WIDTH / 2), int(SCREEN_HEIGHT / 2))
self.move(
int((SCREEN_WIDTH / 2)) - int((self.frameSize().width() / 2)),
int((SCREEN_HEIGHT / 2)) - int((self.frameSize().height() / 2))
)
main_window.setStyleSheet("background-color: rgb(28, 39, 40);\n"
"color: rgb(231, 231, 231);")
main_window.setWindowIcon(QtGui.QIcon('ressources/logo.ico'))
self.central_widget = QtWidgets.QWidget(main_window)
self.central_widget.setObjectName("central_widget")
# Grid Layout containing everything
self.grid_layout = QtWidgets.QGridLayout(self.central_widget)
self.grid_layout.setObjectName("grid_layout")
# Vertical Layout for
# proxies ?
# < buttons | labels >
self.vertical_layout_prox = QtWidgets.QVBoxLayout()
self.vertical_layout_prox.setObjectName("vertical_layout_prox")
# ## Switch at the top for Proxies or Proxyless
self.proxy_btn = QtWidgets.QPushButton(self.central_widget)
self.proxy_btn.setMinimumSize(QtCore.QSize(131, 23))
self.proxy_btn.setObjectName("proxy_btn")
self.vertical_layout_prox.addWidget(self.proxy_btn)
# ## ------------
# Horizontal Layout for < buttons | labels >
self.horizontal_layout = QtWidgets.QHBoxLayout()
self.horizontal_layout.setObjectName("horizontal_layout")
# Vertical Layout for the buttons
self.vertical_layout = QtWidgets.QVBoxLayout()
self.vertical_layout.setObjectName("vertical_layout")
# input button
self.input_btn = QtWidgets.QPushButton(self.central_widget)
self.input_btn.setMinimumSize(QtCore.QSize(131, 23))
self.input_btn.setObjectName("input_btn")
self.vertical_layout.addWidget(self.input_btn)
# stat button
self.stat_btn = QtWidgets.QPushButton(self.central_widget)
self.stat_btn.setMinimumSize(QtCore.QSize(131, 23))
self.stat_btn.setObjectName("stat_btn")
self.vertical_layout.addWidget(self.stat_btn)
# output button
self.output_btn = QtWidgets.QPushButton(self.central_widget)
self.output_btn.setMinimumSize(QtCore.QSize(131, 23))
self.output_btn.setObjectName("output_btn")
self.vertical_layout.addWidget(self.output_btn)
# run button
self.run_btn = QtWidgets.QPushButton(self.central_widget)
self.run_btn.setMinimumSize(QtCore.QSize(131, 23))
self.run_btn.setObjectName("run_btn")
self.vertical_layout.addWidget(self.run_btn)
self.horizontal_layout.addLayout(self.vertical_layout)
self.vertical_layout_prox.addLayout(self.horizontal_layout)
self.vertical_layout_2 = QtWidgets.QVBoxLayout()
self.vertical_layout_2.setObjectName("vertical_layout_2")
# input Label
self.chosen_file_lbl = QtWidgets.QLabel(self.central_widget)
self.chosen_file_lbl.setMinimumSize(QtCore.QSize(200, 23))
self.chosen_file_lbl.setStyleSheet("color: rgb(156, 156, 156);\n"
"background-color: rgb(61, 61, 61);\n"
"border-color: rgb(71, 71, 71);")
self.chosen_file_lbl.setAlignment(QtCore.Qt.AlignCenter)
self.chosen_file_lbl.setObjectName("chosen_file_lbl")
self.vertical_layout_2.addWidget(self.chosen_file_lbl)
# stat Label
self.chosen_stat_lbl = QtWidgets.QLabel(self.central_widget)
self.chosen_stat_lbl.setMinimumSize(QtCore.QSize(200, 23))
self.chosen_stat_lbl.setStyleSheet("color: rgb(156, 156, 156);\n"
"background-color: rgb(61, 61, 61);\n"
"border-color: rgb(71, 71, 71);")
self.chosen_stat_lbl.setAlignment(QtCore.Qt.AlignCenter)
self.chosen_stat_lbl.setObjectName("chosen_stat_lbl")
self.vertical_layout_2.addWidget(self.chosen_stat_lbl)
# output label
self.chosen_out_lbl = QtWidgets.QLabel(self.central_widget)
self.chosen_out_lbl.setMinimumSize(QtCore.QSize(200, 23))
self.chosen_out_lbl.setStyleSheet("color: rgb(156, 156, 156);\n"
"background-color: rgb(61, 61, 61);\n"
"border-color: rgb(71, 71, 71);\n"
"")
self.chosen_out_lbl.setAlignment(QtCore.Qt.AlignCenter)
self.chosen_out_lbl.setObjectName("chosen_out_lbl")
self.vertical_layout_2.addWidget(self.chosen_out_lbl)
# Progress bar
self.progress_bar = QtWidgets.QProgressBar(self.central_widget)
self.progress_bar.setMinimumSize(QtCore.QSize(200, 23))
self.progress_bar.setStyleSheet("QProgressBar{\n"
" border: 2px solid rgb(139, 28, 59);\n"
" border-radius: 5px;\n"
" text-align: center\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: rgb(172, 35, 72);\n"
" width: 10px;\n"
"}")
self.progress_bar.setProperty("value", 0)
self.progress_bar.setTextVisible(True)
self.progress_bar.setObjectName("progress_bar")
self.vertical_layout_2.addWidget(self.progress_bar)
self.horizontal_layout.addLayout(self.vertical_layout_2)
self.grid_layout.addLayout(self.vertical_layout_prox, 0, 0, 1, 1)
# Console Display
self.console_layout = QtWidgets.QVBoxLayout()
self.console_layout.setObjectName("console_layout")
self.console_lbl = QtWidgets.QLabel(self.central_widget)
self.console_lbl.setMinimumSize(QtCore.QSize(101, 16))
self.console_lbl.setStyleSheet("background-color: rgb(47, 66, 68);\n"
"color: rgb(231, 231, 231);\n"
"border-color: rgb(47, 47, 47);")
self.console_lbl.setAlignment(QtCore.Qt.AlignCenter)
self.console_lbl.setObjectName("console_lbl")
self.console_layout.addWidget(self.console_lbl)
self.console_disp = QtWidgets.QTextEdit(self.central_widget)
self.console_disp.setMinimumSize(QtCore.QSize(339, 113))
self.console_disp.setSizeIncrement(QtCore.QSize(3, 1))
self.console_disp.setStyleSheet("color: rgb(38, 209, 0);\n"
"border-color: rgb(71, 71, 71);\n"
"background-color: rgb(0, 0, 0);")
self.console_disp.setReadOnly(True)
self.console_disp.setObjectName("console_disp")
self.console_layout.addWidget(self.console_disp)
self.grid_layout.addLayout(self.console_layout, 1, 0, 1, 1)
main_window.setCentralWidget(self.central_widget)
self.action_hello = QtWidgets.QAction(main_window)
self.action_hello.setObjectName("action_hello")
self.retranslateUi(main_window)
QtCore.QMetaObject.connectSlotsByName(main_window)
def retranslateUi(self, main_window):
_translate = QtCore.QCoreApplication.translate
main_window.setWindowTitle(_translate("main_window", "CMScrape - CardMarket Price Tracker"))
self.proxy_btn.setText(_translate("main_window", "Without Proxies (limited to 30/min)"))
self.input_btn.setText(_translate("main_window", "Choose Input File"))
self.stat_btn.setText(_translate("main_window", "Choose Statistics File"))
self.output_btn.setText(_translate("main_window", "Choose Output File"))
self.run_btn.setText(_translate("main_window", "Run"))
self.chosen_file_lbl.setText(_translate("main_window", "No file chosen"))
self.chosen_stat_lbl.setText(_translate("main_window", "No file chosen"))
self.chosen_out_lbl.setText(_translate("main_window", "No file chosen"))
self.action_hello.setText(_translate("main_window", "Hello"))
self.console_lbl.setText(_translate("main_window", "Console output :")) #
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = UiMainWindow()
ui.setupUi(MainWindow)
# ## What should be done is putting only the \r'd text in the console, rewriting it, and append the errors I could
# ## in the begining or end of string, to be shown if user wants to.
# ## maybe yet another argument "-se, --show-errors" that would work in cmd and
MainWindow.show()
sys.exit(app.exec_())