sistemazioni interfaccia, compilazione lista dei file automatica
This commit is contained in:
@@ -170,9 +170,9 @@ class Ui_titolo(object):
|
|||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
titolo.setWindowTitle(_translate("titolo", "Nomi file di Uscita"))
|
titolo.setWindowTitle(_translate("titolo", "Nomi file di Uscita"))
|
||||||
self.label.setText(_translate("titolo", "Separatore"))
|
self.label.setText(_translate("titolo", "Separatore"))
|
||||||
self.rad_datajpn.setText(_translate("titolo", "YYYY MM DD, es. 2000 12 31"))
|
self.rad_datajpn.setText(_translate("titolo", "YYYY MM DD, es. 2000 12 31 (jpn)"))
|
||||||
self.rad_dataita.setText(_translate("titolo", "DD MM YYYY, es. 31 12 2000"))
|
self.rad_dataita.setText(_translate("titolo", "DD MM YYYY, es. 31 12 2000 (ita)"))
|
||||||
self.rad_datausa.setText(_translate("titolo", "MM DD YYYY, es. 12 31 2000"))
|
self.rad_datausa.setText(_translate("titolo", "MM DD YYYY, es. 12 31 2000 (us)"))
|
||||||
self.chk_titolo.setText(_translate("titolo", "Titolo articolo"))
|
self.chk_titolo.setText(_translate("titolo", "Titolo articolo"))
|
||||||
self.lbl_ncarat.setText(_translate("titolo", "Numero di caratteri"))
|
self.lbl_ncarat.setText(_translate("titolo", "Numero di caratteri"))
|
||||||
self.lbl_impotit.setText(_translate("titolo", "Impostazioni nome file"))
|
self.lbl_impotit.setText(_translate("titolo", "Impostazioni nome file"))
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rad_datajpn">
|
<widget class="QRadioButton" name="rad_datajpn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>YYYY MM DD, es. 2000 12 31</string>
|
<string>YYYY MM DD, es. 2000 12 31 (jpn)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -41,14 +41,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rad_dataita">
|
<widget class="QRadioButton" name="rad_dataita">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>DD MM YYYY, es. 31 12 2000</string>
|
<string>DD MM YYYY, es. 31 12 2000 (ita)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rad_datausa">
|
<widget class="QRadioButton" name="rad_datausa">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>MM DD YYYY, es. 12 31 2000</string>
|
<string>MM DD YYYY, es. 12 31 2000 (us)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -2,9 +2,33 @@
|
|||||||
"version": "v1.1a",
|
"version": "v1.1a",
|
||||||
"paths": {
|
"paths": {
|
||||||
"lastUsed": "defaults.json",
|
"lastUsed": "defaults.json",
|
||||||
"configurationPath": "D:\\Emanuele\\Documenti\\workspace\\bananaSPLIT\\",
|
"configurationPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/bananaSPLIT/conf/",
|
||||||
"INworkPath": "D:\\Emanuele\\Documenti\\workspace\\bananaSPLIT\\TestFiles\\",
|
"INworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles",
|
||||||
"OUTworkPath": "H:\\"
|
"OUTworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles",
|
||||||
|
"fileList": [
|
||||||
|
".",
|
||||||
|
"..",
|
||||||
|
"GUARDIAN 1993.txt",
|
||||||
|
"GUARDIAN 1996.txt",
|
||||||
|
"GUARDIAN 1999.txt",
|
||||||
|
"GUARDIAN 2002.txt",
|
||||||
|
"GUARDIAN 2005.txt",
|
||||||
|
"GUARDIAN 2008.txt",
|
||||||
|
"GUARDIAN 2012.txt",
|
||||||
|
"GUARDIAN 2015.txt",
|
||||||
|
"GUARDIAN 2018.txt",
|
||||||
|
"NYT 1990.txt",
|
||||||
|
"NYT 1994.txt",
|
||||||
|
"NYT 1997.txt",
|
||||||
|
"NYT 2000.txt",
|
||||||
|
"NYT 2003.txt",
|
||||||
|
"NYT 2006.txt",
|
||||||
|
"NYT 2009.txt",
|
||||||
|
"NYT 2013.txt",
|
||||||
|
"NYT 2015.txt",
|
||||||
|
"NYT 2017.txt",
|
||||||
|
"README"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"docStruct": {
|
"docStruct": {
|
||||||
"language": "scelto da languageconf.json",
|
"language": "scelto da languageconf.json",
|
||||||
@@ -12,7 +36,7 @@
|
|||||||
"dateFormat": "{month} {day:d}, {year:d}{}",
|
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||||
"outPrefix": "123",
|
"outPrefix": "123",
|
||||||
"outSuffix": "456",
|
"outSuffix": "456",
|
||||||
"outDateType": "ita",
|
"outDateType": "jpn",
|
||||||
"outNameFormat": "",
|
"outNameFormat": "",
|
||||||
"outDate": true,
|
"outDate": true,
|
||||||
"outNumber": true,
|
"outNumber": true,
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
try:
|
try:
|
||||||
self.ui.lbl_sorg.setText(self.conf.getParam('paths','INworkPath'))
|
self.ui.lbl_sorg.setText(self.conf.getParam('paths','INworkPath'))
|
||||||
self.ui.lbl_dest.setText(self.conf.getParam('paths','OUTworkPath'))
|
self.ui.lbl_dest.setText(self.conf.getParam('paths','OUTworkPath'))
|
||||||
|
self.fillFileList()
|
||||||
except:
|
except:
|
||||||
self.log.critical("MainWindow: Configurazione non accettata")
|
self.log.critical("MainWindow: Configurazione non accettata")
|
||||||
|
|
||||||
@@ -83,7 +84,14 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
self.titoloav.fillInterface()
|
self.titoloav.fillInterface()
|
||||||
self.selezout.fillInterface()
|
self.selezout.fillInterface()
|
||||||
self.advopt.fillInterface()
|
self.advopt.fillInterface()
|
||||||
|
|
||||||
|
def fillFileList(self):
|
||||||
|
fl = QDir(self.conf.getParam('paths','INworkPath')).entryList()
|
||||||
|
self.ui.lst_files.clear()
|
||||||
|
for f in fl:
|
||||||
|
self.ui.lst_files.addItem(PyQt5.QtWidgets.QListWidgetItem(f))
|
||||||
|
self.conf.setParam(('paths', 'fileList'), fl)
|
||||||
|
|
||||||
def nextTab(self):
|
def nextTab(self):
|
||||||
self.ui.wgt_main.setCurrentIndex(self.ui.wgt_main.currentIndex()+1)
|
self.ui.wgt_main.setCurrentIndex(self.ui.wgt_main.currentIndex()+1)
|
||||||
self.logger.debug("Prossima Tab")
|
self.logger.debug("Prossima Tab")
|
||||||
@@ -138,9 +146,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
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.debug("Selezionata Cartella Sorgente: {}".format(rv))
|
||||||
fl = QDir(rv).entryList()
|
self.fillFileList()
|
||||||
for f in fl:
|
|
||||||
self.ui.lst_files.addItem(PyQt5.QtWidgets.QListWidgetItem(f))
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def selezDest(self):
|
def selezDest(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user