finestra dei messaggi attiva con il log
This commit is contained in:
@@ -38,15 +38,6 @@ class Ui_mainwin(object):
|
|||||||
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
self.line_2.setObjectName("line_2")
|
self.line_2.setObjectName("line_2")
|
||||||
self.gridLayout_2.addWidget(self.line_2, 2, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.line_2, 2, 0, 1, 1)
|
||||||
self.label_4 = QtWidgets.QLabel(self.centralwidget)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(11)
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.label_4.setFont(font)
|
|
||||||
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.label_4.setObjectName("label_4")
|
|
||||||
self.gridLayout_2.addWidget(self.label_4, 3, 0, 1, 1)
|
|
||||||
self.wgt_main = QtWidgets.QTabWidget(self.centralwidget)
|
self.wgt_main = QtWidgets.QTabWidget(self.centralwidget)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
@@ -181,8 +172,30 @@ class Ui_mainwin(object):
|
|||||||
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 4)
|
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 4)
|
||||||
self.wgt_main.addTab(self.wgt_mainPage1, "")
|
self.wgt_main.addTab(self.wgt_mainPage1, "")
|
||||||
self.gridLayout_2.addWidget(self.wgt_main, 1, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.wgt_main, 1, 0, 1, 1)
|
||||||
|
self.txt_log = QtWidgets.QTextEdit(self.centralwidget)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.txt_log.sizePolicy().hasHeightForWidth())
|
||||||
|
self.txt_log.setSizePolicy(sizePolicy)
|
||||||
|
self.txt_log.setMaximumSize(QtCore.QSize(16777215, 100))
|
||||||
|
self.txt_log.setAcceptDrops(False)
|
||||||
|
self.txt_log.setAutoFillBackground(False)
|
||||||
|
self.txt_log.setStyleSheet("background-color: rgb(0,0,0);")
|
||||||
|
self.txt_log.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.txt_log.setObjectName("txt_log")
|
||||||
|
self.gridLayout_2.addWidget(self.txt_log, 5, 0, 1, 1)
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||||
|
self.label_4 = QtWidgets.QLabel(self.centralwidget)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setPointSize(11)
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.label_4.setFont(font)
|
||||||
|
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.label_4.setObjectName("label_4")
|
||||||
|
self.horizontalLayout_3.addWidget(self.label_4)
|
||||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_3.addItem(spacerItem1)
|
self.horizontalLayout_3.addItem(spacerItem1)
|
||||||
self.label_3 = QtWidgets.QLabel(self.centralwidget)
|
self.label_3 = QtWidgets.QLabel(self.centralwidget)
|
||||||
@@ -207,16 +220,7 @@ class Ui_mainwin(object):
|
|||||||
self.horizontalLayout_3.addWidget(self.lbl_preset)
|
self.horizontalLayout_3.addWidget(self.lbl_preset)
|
||||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_3.addItem(spacerItem2)
|
self.horizontalLayout_3.addItem(spacerItem2)
|
||||||
self.gridLayout_2.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
|
self.gridLayout_2.addLayout(self.horizontalLayout_3, 3, 0, 1, 1)
|
||||||
self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.textEdit.sizePolicy().hasHeightForWidth())
|
|
||||||
self.textEdit.setSizePolicy(sizePolicy)
|
|
||||||
self.textEdit.setMaximumSize(QtCore.QSize(16777215, 100))
|
|
||||||
self.textEdit.setObjectName("textEdit")
|
|
||||||
self.gridLayout_2.addWidget(self.textEdit, 4, 0, 1, 1)
|
|
||||||
mainwin.setCentralWidget(self.centralwidget)
|
mainwin.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtWidgets.QMenuBar(mainwin)
|
self.menubar = QtWidgets.QMenuBar(mainwin)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 900, 26))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 900, 26))
|
||||||
@@ -271,7 +275,6 @@ class Ui_mainwin(object):
|
|||||||
def retranslateUi(self, mainwin):
|
def retranslateUi(self, mainwin):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
mainwin.setWindowTitle(_translate("mainwin", "bananaSPLIT"))
|
mainwin.setWindowTitle(_translate("mainwin", "bananaSPLIT"))
|
||||||
self.label_4.setText(_translate("mainwin", "Finestra dei messaggi"))
|
|
||||||
self.btn_cartellasorg.setText(_translate("mainwin", "-> "))
|
self.btn_cartellasorg.setText(_translate("mainwin", "-> "))
|
||||||
self.btn_cartelladest.setText(_translate("mainwin", "-> "))
|
self.btn_cartelladest.setText(_translate("mainwin", "-> "))
|
||||||
self.lbl_cartellasorg.setText(_translate("mainwin", "Cartella sorgente"))
|
self.lbl_cartellasorg.setText(_translate("mainwin", "Cartella sorgente"))
|
||||||
@@ -284,13 +287,14 @@ class Ui_mainwin(object):
|
|||||||
self.rad_fileOld.setText(_translate("mainwin", "Vecchia"))
|
self.rad_fileOld.setText(_translate("mainwin", "Vecchia"))
|
||||||
self.btn_avanti.setText(_translate("mainwin", "Avanti"))
|
self.btn_avanti.setText(_translate("mainwin", "Avanti"))
|
||||||
self.wgt_main.setTabText(self.wgt_main.indexOf(self.wgt_mainPage1), _translate("mainwin", "SelezionaFile"))
|
self.wgt_main.setTabText(self.wgt_main.indexOf(self.wgt_mainPage1), _translate("mainwin", "SelezionaFile"))
|
||||||
self.label_3.setText(_translate("mainwin", "Preset corrente: "))
|
self.txt_log.setHtml(_translate("mainwin", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
self.lbl_preset.setText(_translate("mainwin", "..."))
|
|
||||||
self.textEdit.setHtml(_translate("mainwin", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
|
||||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
"p, li { white-space: pre-wrap; }\n"
|
||||||
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
|
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
|
||||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
|
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;\"><br /></p></body></html>"))
|
||||||
|
self.label_4.setText(_translate("mainwin", "Finestra dei messaggi"))
|
||||||
|
self.label_3.setText(_translate("mainwin", "Preset corrente: "))
|
||||||
|
self.lbl_preset.setText(_translate("mainwin", "..."))
|
||||||
self.bar_file.setTitle(_translate("mainwin", "File"))
|
self.bar_file.setTitle(_translate("mainwin", "File"))
|
||||||
self.menuOpzioni.setTitle(_translate("mainwin", "Opzioni"))
|
self.menuOpzioni.setTitle(_translate("mainwin", "Opzioni"))
|
||||||
self.toolBar.setWindowTitle(_translate("mainwin", "toolBar"))
|
self.toolBar.setWindowTitle(_translate("mainwin", "toolBar"))
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>756</width>
|
<width>900</width>
|
||||||
<height>703</height>
|
<height>750</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -38,9 +38,19 @@
|
|||||||
<property name="animated">
|
<property name="animated">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="dockOptions">
|
||||||
|
<set>QMainWindow::AllowTabbedDocks</set>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
|
<widget class="Line" name="line_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QTabWidget" name="wgt_main">
|
<widget class="QTabWidget" name="wgt_main">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||||
@@ -196,7 +206,20 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="4">
|
<item row="3" column="0" colspan="4">
|
||||||
<widget class="QListWidget" name="lst_files"/>
|
<widget class="QListWidget" name="lst_files">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>200</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="4">
|
<item row="4" column="0" colspan="4">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
@@ -288,50 +311,120 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="5" column="0">
|
||||||
<widget class="Line" name="line_2">
|
<widget class="QTextEdit" name="txt_log">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="wgt_sub" native="true">
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>500</height>
|
<height>100</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<property name="acceptDrops">
|
||||||
<item>
|
<bool>false</bool>
|
||||||
<widget class="QLabel" name="lbl_log">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="autoFillBackground">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
<bool>false</bool>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
<property name="styleSheet">
|
||||||
</sizepolicy>
|
<string notr="true">background-color: rgb(0,0,0);</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="html">
|
||||||
<string>qui ci va il log ma devo pensare a come farlo in modo non eccessivamente stupido</string>
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
</property>
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
</widget>
|
p, li { white-space: pre-wrap; }
|
||||||
</item>
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;">
|
||||||
</layout>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Finestra dei messaggi</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Preset corrente: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_preset">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
@@ -339,7 +432,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>756</width>
|
<width>900</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
70
bananaSPLIT/conf/spiripacchio.json
Normal file
70
bananaSPLIT/conf/spiripacchio.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"version": "v1.2",
|
||||||
|
"paths": {
|
||||||
|
"lastUsed": "spiripacchio.json",
|
||||||
|
"configurationPath": "./conf/",
|
||||||
|
"INworkPath": "D:/Test",
|
||||||
|
"OUTworkPath": "C:/",
|
||||||
|
"fileList": [
|
||||||
|
"config.txt",
|
||||||
|
"GUARDIAN.txt",
|
||||||
|
"interrupts.txt",
|
||||||
|
"tlsdebug.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"docStruct": {
|
||||||
|
"fileVersNew": true,
|
||||||
|
"language": "English",
|
||||||
|
"languageIdx": 1,
|
||||||
|
"docSep": "\\s*Copyright [(0-9)]+",
|
||||||
|
"beginOfDocument": "\\s*Body",
|
||||||
|
"endOfDocument": "\\s*End of Document",
|
||||||
|
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||||
|
"outPrefix": "",
|
||||||
|
"outSuffix": "",
|
||||||
|
"outExt": ".txt",
|
||||||
|
"outDateType": "jpn",
|
||||||
|
"outNameFormat": "",
|
||||||
|
"outDate": true,
|
||||||
|
"outTitle": true,
|
||||||
|
"outNumber": true,
|
||||||
|
"numberPos": 1,
|
||||||
|
"datePos": 2,
|
||||||
|
"titlePos": 3,
|
||||||
|
"maxTitleLen": 16,
|
||||||
|
"outNameSep": "-",
|
||||||
|
"customSep": "=",
|
||||||
|
"dateFormats": {
|
||||||
|
"jpn": "{year:04d}{month:02d}{day:02d}",
|
||||||
|
"it": "{day:02d}{month:02d}{year:04d}",
|
||||||
|
"usa": "{month:02d}{year:04d}{day:02d}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"encoding": "ansi",
|
||||||
|
"monthPosition": 0,
|
||||||
|
"getNewsPaperName": true,
|
||||||
|
"nameNotFoundStr": "ND",
|
||||||
|
"includeTitle": true,
|
||||||
|
"removeDuplicates": true,
|
||||||
|
"showSkipped": false,
|
||||||
|
"showRemovedDuplicates": false,
|
||||||
|
"loadTXT": true,
|
||||||
|
"loadDOCX": false,
|
||||||
|
"removeOldFiles": true,
|
||||||
|
"saveSeparateFiles": true,
|
||||||
|
"saveBodyFile": true,
|
||||||
|
"saveBodyNumber": true,
|
||||||
|
"delLF": false,
|
||||||
|
"delWordBreak": true,
|
||||||
|
"delChars": [
|
||||||
|
"'",
|
||||||
|
"@",
|
||||||
|
"#",
|
||||||
|
"$",
|
||||||
|
"%",
|
||||||
|
"^",
|
||||||
|
"&"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,7 +32,8 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
self.conf.open()
|
self.conf.open()
|
||||||
self.conf.use("defaults.json")
|
self.conf.use("defaults.json")
|
||||||
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
|
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
|
||||||
except:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# inizializzazione interfaccia
|
# inizializzazione interfaccia
|
||||||
@@ -69,6 +70,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
#connetti segnali delle sottointerfacce
|
#connetti segnali delle sottointerfacce
|
||||||
self.advopt.update.connect(self.fillAllInterfaces)
|
self.advopt.update.connect(self.fillAllInterfaces)
|
||||||
|
self.logger.sendLog.connect(self.appendLog)
|
||||||
|
|
||||||
#riempi pagine di interfaccia
|
#riempi pagine di interfaccia
|
||||||
self.fillAllInterfaces()
|
self.fillAllInterfaces()
|
||||||
@@ -120,7 +122,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
lf.setNameFilter("bananaCONF (*.json)")
|
lf.setNameFilter("bananaCONF (*.json)")
|
||||||
if lf.exec():
|
if lf.exec():
|
||||||
cf = str(lf.selectedFiles()[0].split('/')[-1])
|
cf = str(lf.selectedFiles()[0].split('/')[-1])
|
||||||
self.logger.debug("Scelto il File: {}".format(cf))
|
self.logger.info("Apro la configurazione: {}".format(cf))
|
||||||
self.conf.open()
|
self.conf.open()
|
||||||
self.conf.use(cf)
|
self.conf.use(cf)
|
||||||
self.logger.debug("Riempio tutte le tab")
|
self.logger.debug("Riempio tutte le tab")
|
||||||
@@ -144,7 +146,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
self.conf.save(fName="defaults.json")
|
self.conf.save(fName="defaults.json")
|
||||||
self.conf.use(prev)
|
self.conf.use(prev)
|
||||||
##
|
##
|
||||||
self.logger.debug("Scrivi il File: {}".format(rv))
|
self.logger.debug("Scrivo la configurazione: {}".format(rv))
|
||||||
self.conf.save(fName=rv)
|
self.conf.save(fName=rv)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -163,7 +165,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
if rv is not "":
|
if rv is not "":
|
||||||
self.conf.setParam(keys=('paths','INworkPath',), val=rv)
|
self.conf.setParam(keys=('paths','INworkPath',), val=rv)
|
||||||
self.ui.lbl_sorg.setText(rv)
|
self.ui.lbl_sorg.setText(rv)
|
||||||
self.logger.debug("Selezionata Cartella Sorgente: {}".format(rv))
|
self.logger.info("Selezionata Cartella Sorgente: {}".format(rv))
|
||||||
self.fillFileList()
|
self.fillFileList()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -172,7 +174,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
if rv is not "":
|
if rv is not "":
|
||||||
self.conf.setParam(keys=('paths','OUTworkPath',), val=rv)
|
self.conf.setParam(keys=('paths','OUTworkPath',), val=rv)
|
||||||
self.ui.lbl_dest.setText(rv)
|
self.ui.lbl_dest.setText(rv)
|
||||||
self.logger.debug("Selezionata Cartella Destinazione: {}".format(rv))
|
self.logger.info("Selezionata Cartella Destinazione: {}".format(rv))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def openFileDialog(self, name, path):
|
def openFileDialog(self, name, path):
|
||||||
@@ -183,6 +185,9 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
self.conf.setParam(('docStruct','fileVersNew'), self.ui.rad_fileNew.isChecked())
|
self.conf.setParam(('docStruct','fileVersNew'), self.ui.rad_fileNew.isChecked())
|
||||||
self.titolo.applica()
|
self.titolo.applica()
|
||||||
self.selezout.applica()
|
self.selezout.applica()
|
||||||
|
|
||||||
|
def appendLog(self, msg):
|
||||||
|
self.ui.txt_log.append(msg)
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
####################### INTERFACES ##########################
|
####################### INTERFACES ##########################
|
||||||
@@ -348,13 +353,13 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def returnOk(self):
|
def returnOk(self):
|
||||||
self.log.debug("Avanzate Titolo Accettate")
|
self.log.info("Avanzate Titolo Accettate")
|
||||||
self.applica()
|
self.applica()
|
||||||
self.hide()
|
self.hide()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def returnKo(self):
|
def returnKo(self):
|
||||||
self.log.debug("Avanzate Titolo Rifiutate")
|
self.log.info("Avanzate Titolo Rifiutate")
|
||||||
self.hide()
|
self.hide()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -423,7 +428,7 @@ class bananaSelezOut(PyQt5.QtWidgets.QWidget):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def applica(self):
|
def applica(self):
|
||||||
self.log.info("Applico Impostazioni Uscita")
|
self.log.info("Applico Impostazioni File Uscita")
|
||||||
self.conf.setParam(('docStruct', 'language'), self.selezoutui.cmb_lingua.currentText())
|
self.conf.setParam(('docStruct', 'language'), self.selezoutui.cmb_lingua.currentText())
|
||||||
self.conf.setParam(('docStruct', 'languageIdx'), self.selezoutui.cmb_lingua.currentIndex())
|
self.conf.setParam(('docStruct', 'languageIdx'), self.selezoutui.cmb_lingua.currentIndex())
|
||||||
self.conf.setParam(('settings', 'saveBodyFile'), self.selezoutui.rad_mainbody.isChecked()
|
self.conf.setParam(('settings', 'saveBodyFile'), self.selezoutui.rad_mainbody.isChecked()
|
||||||
@@ -519,14 +524,14 @@ class bananaAdvOpt(PyQt5.QtWidgets.QWidget):
|
|||||||
self.errmsg.setWindowIcon(icon)
|
self.errmsg.setWindowIcon(icon)
|
||||||
try:
|
try:
|
||||||
self.conf.loads(self.advoptui.txt_confFile.toPlainText())
|
self.conf.loads(self.advoptui.txt_confFile.toPlainText())
|
||||||
self.log.info("AdvancedOptions: Parametri inseriti validi, configurazione accettata")
|
self.log.info("Parametri inseriti validi, configurazione accettata")
|
||||||
self.errmsg.setIcon(QMessageBox.Information)
|
self.errmsg.setIcon(QMessageBox.Information)
|
||||||
self.errmsg.setText("Parametri inseriti validi, configurazione accettata")
|
self.errmsg.setText("Parametri inseriti validi, configurazione accettata")
|
||||||
self.errmsg.show()
|
self.errmsg.show()
|
||||||
self.update.emit()
|
self.update.emit()
|
||||||
self.hide()
|
self.hide()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error(f"AdvancedOptions: Parametri inseliti non validi: {e}")
|
self.log.error(f"Errore nei parametri! {e}")
|
||||||
self.errmsg.setIcon(QMessageBox.Critical)
|
self.errmsg.setIcon(QMessageBox.Critical)
|
||||||
self.errmsg.setText(f"Errore nei parametri!\n{e}")
|
self.errmsg.setText(f"Errore nei parametri!\n{e}")
|
||||||
self.errmsg.show()
|
self.errmsg.show()
|
||||||
|
|||||||
@@ -7,12 +7,16 @@ import sys
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import colorama
|
import colorama
|
||||||
|
from PyQt5.QtCore import QObject, pyqtSignal
|
||||||
|
|
||||||
class fancyLogger(object):
|
class fancyLogger(QObject):
|
||||||
'''
|
'''
|
||||||
Colorizza il logger di python, per un' esperienza stile willy wonka
|
Colorizza il logger di python, per un' esperienza stile willy wonka
|
||||||
'''
|
'''
|
||||||
|
sendLog = pyqtSignal(str)
|
||||||
|
|
||||||
def __init__(self, filepath=None, name="Logger", consoleLog=True, fileLog=False):
|
def __init__(self, filepath=None, name="Logger", consoleLog=True, fileLog=False):
|
||||||
|
QObject.__init__(self)
|
||||||
try:
|
try:
|
||||||
with open(filepath, 'r') as fp:
|
with open(filepath, 'r') as fp:
|
||||||
settings = json.load(fp)
|
settings = json.load(fp)
|
||||||
@@ -54,30 +58,35 @@ class fancyLogger(object):
|
|||||||
print(self.LBLUE, end='')
|
print(self.LBLUE, end='')
|
||||||
self.LOGGER.debug(msg)
|
self.LOGGER.debug(msg)
|
||||||
print(self.RST, end='')
|
print(self.RST, end='')
|
||||||
|
self.sendLog.emit(f"<FONT COLOR='#03c2fc'>DEBUG - {msg} </br>")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def info(self, msg="Undefined Info"):
|
def info(self, msg="Undefined Info"):
|
||||||
print(self.LGREEN, end='')
|
print(self.LGREEN, end='')
|
||||||
self.LOGGER.info(msg)
|
self.LOGGER.info(msg)
|
||||||
print(self.RST, end='')
|
print(self.RST, end='')
|
||||||
|
self.sendLog.emit(f"<FONT COLOR='#6bfc03'>INFO - {msg} </br>")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def warn(self, msg="Undefined Warning"):
|
def warn(self, msg="Undefined Warning"):
|
||||||
print(self.LYELLOW, end='')
|
print(self.LYELLOW, end='')
|
||||||
self.LOGGER.warning(msg)
|
self.LOGGER.warning(msg)
|
||||||
print(self.RST, end='')
|
print(self.RST, end='')
|
||||||
|
self.sendLog.emit(f"<FONT COLOR='##fc9403'>WARNING - {msg} </br>")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def error(self, msg="Undefined Error"):
|
def error(self, msg="Undefined Error"):
|
||||||
print(self.LRED, end='')
|
print(self.LRED, end='')
|
||||||
self.LOGGER.error(msg)
|
self.LOGGER.error(msg)
|
||||||
print(self.RST, end='')
|
print(self.RST, end='')
|
||||||
|
self.sendLog.emit(f"<FONT COLOR='#ff0000'>ERROR - {msg} </br>")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def critical(self, msg="Undefined Critical"):
|
def critical(self, msg="Undefined Critical"):
|
||||||
print(self.RED, end='')
|
print(self.RED, end='')
|
||||||
self.LOGGER.critical(msg)
|
self.LOGGER.critical(msg)
|
||||||
print(self.RST, end='')
|
print(self.RST, end='')
|
||||||
|
self.sendLog.emit(f"<FONT COLOR='#fc03ce'>CRITICAL - {msg} </br>")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def testColors(self):
|
def testColors(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user