ricompilate interfacce, verifica script in vscode
This commit is contained in:
@@ -6,32 +6,32 @@ Created on 24 nov 2019
|
||||
import os, glob, subprocess
|
||||
|
||||
def updateInterfaces():
|
||||
uifiles = glob.glob("*.ui")
|
||||
for f in uifiles:
|
||||
command = r"pyuic5.exe "+f
|
||||
print(command)
|
||||
rv = subprocess.run(command, capture_output=True)
|
||||
if rv.returncode == 0:
|
||||
fp = open(r".\\CompiledUI\\"+f.replace("ui","py"), 'w')
|
||||
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
|
||||
fp.close()
|
||||
else:
|
||||
print("Command Failure")
|
||||
uifiles = glob.glob("*.ui")
|
||||
for f in uifiles:
|
||||
command = r"pyuic5.exe "+f
|
||||
print(command)
|
||||
rv = subprocess.run(command, capture_output=True)
|
||||
if rv.returncode == 0:
|
||||
fp = open(r".\\CompiledUI\\"+f.replace("ui","py"), 'w')
|
||||
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
|
||||
fp.close()
|
||||
else:
|
||||
print("Command Failure")
|
||||
|
||||
def updateResources():
|
||||
command = r'pyrcc5.exe '+'.\\resources\\resources.qrc'
|
||||
print (command)
|
||||
rv = subprocess.run(command, capture_output=True)
|
||||
if rv.returncode == 0:
|
||||
fp = open(r".\\compiledUI\\resources_rc.py", 'w')
|
||||
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
|
||||
fp.close()
|
||||
else:
|
||||
print("Command Failure")
|
||||
command = r'pyrcc5.exe '+'.\\resources\\resources.qrc'
|
||||
print (command)
|
||||
rv = subprocess.run(command, capture_output=True)
|
||||
if rv.returncode == 0:
|
||||
fp = open(r".\\compiledUI\\resources_rc.py", 'w')
|
||||
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
|
||||
fp.close()
|
||||
else:
|
||||
print("Command Failure")
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(os.getcwd())
|
||||
os.chdir(r"..\spex\userInterface")
|
||||
updateInterfaces()
|
||||
updateResources()
|
||||
pass
|
||||
print(os.getcwd())
|
||||
os.chdir(r"..\spex\userInterface")
|
||||
updateInterfaces()
|
||||
updateResources()
|
||||
pass
|
||||
@@ -6,16 +6,16 @@ Created on 30 mar 2020
|
||||
import glob, docx2txt
|
||||
|
||||
if __name__ == '__main__':
|
||||
fList = glob.iglob("../TestFiles/File nuovo formato/*.docx")
|
||||
for f in fList:
|
||||
#os.remove(f.replace('.docx', '.txt'))
|
||||
print(f)
|
||||
try:
|
||||
txt=docx2txt.process(f)
|
||||
with open(f.replace('.docx', '.txt'), 'wb') as fp:
|
||||
fp.write(txt.encode('ansi'))
|
||||
fp.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
pass
|
||||
fList = glob.iglob("../TestFiles/File nuovo formato/*.docx")
|
||||
for f in fList:
|
||||
#os.remove(f.replace('.docx', '.txt'))
|
||||
print(f)
|
||||
try:
|
||||
txt=docx2txt.process(f)
|
||||
with open(f.replace('.docx', '.txt'), 'wb') as fp:
|
||||
fp.write(txt.encode('ansi'))
|
||||
fp.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
pass
|
||||
@@ -8,13 +8,13 @@ from libsplit import bananaSPLITTER
|
||||
from libfancylogger import fancyLogger
|
||||
|
||||
if __name__ == "__main__":
|
||||
logger = fancyLogger(filepath=r"./conf/loggerconf.json",fileLog=False)
|
||||
fp = open('./conf/conftest.json', 'r')
|
||||
splitter = bananaSPLITTER(fileParams=json.load(fp), logger=logger)
|
||||
fp.close()
|
||||
splitter.run()
|
||||
logger = fancyLogger(filepath=r"./conf/loggerconf.json",fileLog=False)
|
||||
fp = open('./conf/conftest.json', 'r')
|
||||
splitter = bananaSPLITTER(fileParams=json.load(fp), logger=logger)
|
||||
fp.close()
|
||||
splitter.run()
|
||||
|
||||
logger.info("\n"+"="*50+"\n\tFINITO!!!\n"+"="*50)
|
||||
logger.info("\n"+"="*50+"\n\tFINITO!!!\n"+"="*50)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import subprocess
|
||||
langs = ["en"]
|
||||
|
||||
if __name__ == '__main__':
|
||||
uifiles = glob.glob("..\\*\\*.ui", recursive=True)
|
||||
pyfiles = ['..\\SPEx\\guimain.py','..\\SPEx\\libbananasplit\\libsplit.py','..\\SPEx\\libbananasplit\\libconfload.py']
|
||||
for l in langs:
|
||||
for ui in uifiles:
|
||||
uio = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(ui)[1]))[0]+f"_{l}.ts"
|
||||
subprocess.run(f'lupdate.exe {ui} -ts {uio}')
|
||||
for py in pyfiles:
|
||||
pyo = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(py)[1]))[0]+f"_{l}.ts"
|
||||
print(subprocess.run(f'pylupdate5.exe {py} -ts {pyo}'))
|
||||
pass
|
||||
uifiles = glob.glob("..\\*\\*.ui", recursive=True)
|
||||
pyfiles = ['..\\SPEx\\guimain.py','..\\SPEx\\libbananasplit\\libsplit.py','..\\SPEx\\libbananasplit\\libconfload.py']
|
||||
for l in langs:
|
||||
for ui in uifiles:
|
||||
uio = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(ui)[1]))[0]+f"_{l}.ts"
|
||||
subprocess.run(f'lupdate.exe {ui} -ts {uio}')
|
||||
for py in pyfiles:
|
||||
pyo = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(py)[1]))[0]+f"_{l}.ts"
|
||||
print(subprocess.run(f'pylupdate5.exe {py} -ts {pyo}'))
|
||||
pass
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'about.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -61,6 +63,4 @@ class Ui_about(object):
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">SPEx non e\' soggetto ad alcun tipo di licenza e viene distribuito senza alcuna garanzia.<br />Essendo un progetto "del tempo libero", bug e proposte di espansione verranno sicuramente presi in considerazione, anche se le tempistiche potrebbero variare.</span></p>\n"
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:12pt;\">Contatti:</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:7pt;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">12parsec.software@gmail.com</span></p>\n"
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:12pt;\">Download:<br /></span><a href=\"https://drive.google.com/open?id=10zUm7uHk9st36PVotMwh9wqOeXU3xrr8\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:7pt; text-decoration: underline; color:#0000ff;\">https://drive.google.com/open?id=10zUm7uHk9st36PVotMwh9wqOeXU3xrr8</span></a></p></body></html>"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'advopt.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -69,6 +71,4 @@ class Ui_editconf(object):
|
||||
self.label_2.setText(_translate("editconf", "Da grandi poteri derivano grandi responsabilita\'"))
|
||||
self.btn_cancel.setText(_translate("editconf", "Cancel"))
|
||||
self.btn_ok.setText(_translate("editconf", "OK"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'avanzatetitolo3.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -155,6 +157,4 @@ class Ui_advtitolo3(object):
|
||||
self.btn_annulla.setText(_translate("advtitolo3", "Annulla"))
|
||||
self.btn_OK.setText(_translate("advtitolo3", "OK"))
|
||||
self.label_2.setText(_translate("advtitolo3", "Suffisso Titolo"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'mainwindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -309,6 +311,4 @@ class Ui_mainwin(object):
|
||||
self.actionAvanzate.setText(_translate("mainwin", "Avanzate"))
|
||||
self.actionManuale.setText(_translate("mainwin", "Manuale"))
|
||||
self.actionAbout_SPEx.setText(_translate("mainwin", "About SPEx"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'selezout.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -217,6 +219,4 @@ class Ui_selezout(object):
|
||||
self.label.setText(_translate("selezout", "Caratteri speciali da rimuovere "))
|
||||
self.btn_indietro.setText(_translate("selezout", "Indietro"))
|
||||
self.btn_split.setText(_translate("selezout", "SPLITTA!"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'titolow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -335,6 +337,4 @@ class Ui_titolo(object):
|
||||
self.rad_altro.setText(_translate("titolo", "Altro:"))
|
||||
self.label.setText(_translate("titolo", "Separatore"))
|
||||
self.chk_docnum.setText(_translate("titolo", "Numero documento"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'about.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -61,6 +63,4 @@ class Ui_about(object):
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">SPEx non e\' soggetto ad alcun tipo di licenza e viene distribuito senza alcuna garanzia.<br />Essendo un progetto "del tempo libero", bug e proposte di espansione verranno sicuramente presi in considerazione, anche se le tempistiche potrebbero variare.</span></p>\n"
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:12pt;\">Contatti:</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:7pt;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">12parsec.software@gmail.com</span></p>\n"
|
||||
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:12pt;\">Download:<br /></span><a href=\"https://drive.google.com/open?id=10zUm7uHk9st36PVotMwh9wqOeXU3xrr8\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:7pt; text-decoration: underline; color:#0000ff;\">https://drive.google.com/open?id=10zUm7uHk9st36PVotMwh9wqOeXU3xrr8</span></a></p></body></html>"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'advopt.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -69,6 +71,4 @@ class Ui_editconf(object):
|
||||
self.label_2.setText(_translate("editconf", "Da grandi poteri derivano grandi responsabilita\'"))
|
||||
self.btn_cancel.setText(_translate("editconf", "Cancel"))
|
||||
self.btn_ok.setText(_translate("editconf", "OK"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'avanzatetitolo3.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -155,6 +157,4 @@ class Ui_advtitolo3(object):
|
||||
self.btn_annulla.setText(_translate("advtitolo3", "Annulla"))
|
||||
self.btn_OK.setText(_translate("advtitolo3", "OK"))
|
||||
self.label_2.setText(_translate("advtitolo3", "Suffisso Titolo"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'mainwindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -309,6 +311,4 @@ class Ui_mainwin(object):
|
||||
self.actionAvanzate.setText(_translate("mainwin", "Avanzate"))
|
||||
self.actionManuale.setText(_translate("mainwin", "Manuale"))
|
||||
self.actionAbout_SPEx.setText(_translate("mainwin", "About SPEx"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'selezout.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -217,6 +219,4 @@ class Ui_selezout(object):
|
||||
self.label.setText(_translate("selezout", "Caratteri speciali da rimuovere "))
|
||||
self.btn_indietro.setText(_translate("selezout", "Indietro"))
|
||||
self.btn_split.setText(_translate("selezout", "SPLITTA!"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'titolow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.12.1
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
# 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
|
||||
|
||||
@@ -335,6 +337,4 @@ class Ui_titolo(object):
|
||||
self.rad_altro.setText(_translate("titolo", "Altro:"))
|
||||
self.label.setText(_translate("titolo", "Separatore"))
|
||||
self.chk_docnum.setText(_translate("titolo", "Numero documento"))
|
||||
|
||||
|
||||
import resources_rc
|
||||
|
||||
Reference in New Issue
Block a user