210 Commits

Author SHA1 Message Date
Obbart 18597dfbbf Compilata versione 1.3 pronta alla release 2020-04-02 18:28:55 +02:00
Obbart 7ffce8cdfd Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2020-04-02 18:26:29 +02:00
Obbart 7237a8be40 versione definitiva interfaccia, pronta per buildare i pacchetti 2020-04-02 18:26:06 +02:00
emanuele b3cc5689aa ricompilato eseguible linux 2020-04-02 17:38:33 +02:00
Obbart 0e1697d98b ridotto ancora 2020-04-02 17:34:53 +02:00
Obbart 6d6e3aa7c5 provo a ridurre dimensioni verticali interfaccia 2020-04-02 17:32:13 +02:00
emanuele 6314efb5f5 corretto linux builfile 2020-04-02 17:30:45 +02:00
emanuele 4884f2659e Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2020-04-02 16:51:14 +02:00
emanuele 029860f2f2 ricompilato eseguibile linux 2020-04-02 16:51:00 +02:00
Obbart 140e24edce ricompilato .exe 2020-04-02 15:45:43 +02:00
Obbart 6eed7b25df eliminata icona sbagliata 2020-04-02 15:43:57 +02:00
emanuele e000b438ec corretto path di uscita 2020-04-02 15:40:40 +02:00
Obbart 200565e4c7 non va bene tenere nella stessa cartella le build win e linux mannaggina 2020-04-02 15:17:50 +02:00
emanuele e994e3850c buildfiles per linux 2020-04-02 15:11:03 +02:00
Obbart e1ac0f05a0 cosine 2020-04-02 14:39:45 +02:00
Obbart 7eb7c0f4a4 aggiunti i file buildati come exe unico 2020-04-01 16:10:18 +02:00
Obbart 45cb777024 i build tools funzionano! 2020-04-01 16:08:15 +02:00
Obbart c149d97e8b corretti livelli debug 2020-04-01 14:56:12 +02:00
Obbart fbf8719591 spaziate giuste le cose 2020-04-01 14:52:36 +02:00
Obbart 44f358a08b finestra dei messaggi attiva con il log 2020-04-01 14:49:44 +02:00
Obbart ca21aa3d44 cose 2020-04-01 13:15:31 +02:00
Obbart 31accbd0b8 correzioni interfaccia 2020-04-01 12:27:07 +02:00
Obbart d2c77e4da3 elimate configurazioni farlocche 2020-04-01 12:13:23 +02:00
Obbart 00ed797b24 ricompilate interfacce titolo 2020-04-01 12:07:15 +02:00
Obbart 186ce10a3e opzioni avanzate globali funzionanti 2020-04-01 12:06:58 +02:00
Obbart 187df248dd integrate la finestra opzioni avanzate 2020-03-31 12:48:00 +02:00
Obbart 0cf019be47 sostituita finestra opzioni avanzate 2020-03-31 12:36:40 +02:00
Obbart cbc097a4d2 marcata release 1.2 2020-03-31 12:28:51 +02:00
Obbart 2f95c01a78 ricompilate interfacce 2020-03-31 12:27:19 +02:00
Obbart 8ace2fb17d tutte le finestre hanno le icone al loro posto 2020-03-31 12:27:06 +02:00
Obbart 5fad4be476 aggiunti file di risorse e icone 2020-03-31 11:54:12 +02:00
Obbart 14590b511f modifica file configurazione default 2020-03-31 11:53:24 +02:00
Obbart 038b838c04 aggiornato gitignore 2020-03-31 11:53:12 +02:00
Obbart 07641d702c prima versione funzionante con i file nuovi
corretto errore unicode, rimosso body dal contenuto del file, potrebbe
rimanere il problema della chiave 'year'
2020-03-30 18:12:53 +02:00
Obbart 65bb3a925d aggiornato .gitignore per escludere build 2020-03-30 17:30:08 +02:00
Obbart 174a8f7e9c errore unicode 2020-03-30 17:25:12 +02:00
Obbart 3978569e35 prima versione funzionante con il nuovo tipo di file!! yuppi! 2020-03-30 16:15:59 +02:00
Obbart 955ac56e34 porca mucca! era solo una lettera accentata nel commento di python che
mandava in crisi l'interprete!!!!
2020-03-30 15:08:19 +02:00
Obbart 6d43c564b8 non riesco a provare le modifiche, il debugger di python mi prende per
il culo
2020-03-30 14:52:09 +02:00
Obbart 989aa755dd ricompilate interfacce 2020-03-30 13:17:08 +02:00
Obbart 5725c14b83 selezione della versione del file, filtraggio tipo per txt 2020-03-30 13:16:56 +02:00
Obbart 83f3a1f629 prima della prima prova della nuova versione 2020-03-30 13:01:32 +02:00
Obbart 33fd392725 prima della prima prova per la nuova versione 2020-03-30 13:01:12 +02:00
Obbart af7e783f35 prima versione per parsare il nuovo file 2020-03-30 12:39:03 +02:00
Obbart 9cc01bd911 aggiunto convertitore di docx 2020-03-30 12:25:14 +02:00
Obbart 3e9088389b piccola modifica interfaccia 2020-03-27 16:47:33 +01:00
Obbart 397c631c2a cosine 2020-03-27 16:47:17 +01:00
Obbart 0093026d49 funziona con i runnable che non sono dei veri thread ma vanno bene lo
stesso


unico problema e' che non si possono inviare i segnali dai runnable, ci
devo guardare
2020-03-25 17:42:21 +01:00
Obbart bd6b6421ec funziona senza os.chdir 2020-03-25 16:35:33 +01:00
Obbart 232108a6f4 forse tolti tutti i os.chdir 2020-03-25 16:28:07 +01:00
Obbart a2400ccdbc continua a funzionare ma solo con un thread per volta
devo togliere os.chdir e usare i percorsi assoluti, altrimenti si
confonde perche' cambia la dir globalmente
2020-03-25 16:20:02 +01:00
Obbart d9bea99092 FUNZIONAAAAAAAAAA!!!!! 2020-03-25 15:18:51 +01:00
Obbart d06cb0c7c4 cose 2020-03-25 12:30:15 +01:00
Obbart 8f1a67c608 fixati bug minori
pronto per il test.. ma dopo pranzo
2020-03-25 12:30:02 +01:00
Obbart 61aac1e364 continua la costruzione per la chiamata dei thread 2020-03-25 12:06:55 +01:00
Obbart f65fa21400 rinominata variabile 2020-03-25 12:03:55 +01:00
Obbart 4351e10984 correzione dello splitter per nuovo file di configurazione 2020-03-25 11:08:16 +01:00
Obbart 62f9dbe598 aggiunta costruzione della configurazione per splitter 2020-03-25 11:05:38 +01:00
Obbart b596f37cc3 cosa in prepareazione a integrazione dello splitter 2020-03-23 16:28:25 +01:00
Obbart 6013eaab38 splitter e' diventato un QThread per mandare messaggi all'esterno 2020-03-23 11:29:40 +01:00
Obbart f0c012bbf0 riempimento e salvataggio interfaccia selezione uscita 2020-03-23 10:39:54 +01:00
Obbart dbeb119c65 corretto il buggone di titolo avanzate
non salvava le impostazioni perche' inizializzavo due volte la finestra
delle avanzate e venivano prese le impostazioni solo di quella che non
veniva usata
2020-03-23 10:09:14 +01:00
Obbart 09f86c94be permane il bug per cui dalle avanzate titolo non posso salvare
potrebbe essere il fatto che passa la classe di configurazione non per
puntatore ma per copia
2020-03-08 16:10:43 +01:00
Obbart 3f3875faf3 sistemazioni interfaccia, compilazione lista dei file automatica 2020-03-08 15:36:27 +01:00
Obbart 40b9978933 fixate cose 2020-03-08 15:25:23 +01:00
Obbart 0047f766bf self.conf chiamato senza usare c=self.conf, provoca comportamenti strani 2020-03-08 15:13:45 +01:00
Obbart 986e50afdb ricompilato interfacce di nuovo 2020-03-08 15:01:51 +01:00
Obbart 2b646befac ricompilata interfaccia outfile 2020-03-08 14:57:23 +01:00
Obbart 18959b4087 rimosse vecchie configurazioni 2020-03-08 14:33:11 +01:00
Obbart 6e6f91f50a aggiornato gitignore
esclude i file di configurazione di test dai commit
2020-03-08 14:24:53 +01:00
Obbart 9ec74ff4bd cose cambiate in interfaccia e main 2020-03-08 14:23:33 +01:00
Obbart 37cf77c160 eliminati file configurazone di test 2020-03-08 14:23:15 +01:00
Obbart 9c04b5d943 spostati i file di configurazione, da fare la gestione finestra di
output per scegliere la lingua
2020-03-03 17:41:28 +01:00
Obbart 25747c0a94 risolto bug preset, forse 2020-03-03 17:29:44 +01:00
Obbart 6c03df4f67 quasi fixato bug del salvapreset 2020-03-03 17:22:58 +01:00
Obbart 05b794029c cose con i file di configurazione, non funziona bene la scrittura 2020-03-02 19:17:47 +01:00
Obbart dcb5f631b0 funzzioni fill interface per ricaricare quando si apre un preset 2020-03-02 18:56:53 +01:00
Obbart e8c7accf55 interfacce aggiornate e ricompilate 2020-02-29 18:12:01 +01:00
Obbart 41ee3c3094 riempi interfaccia da file parte seconda 2020-02-29 18:11:45 +01:00
Obbart 67aaf33db0 caricameto defaults da inerfaccia, parte prima 2020-02-29 16:35:02 +01:00
Giulia 95594674f3 rimoddo asdf 2020-01-25 19:10:45 +01:00
Giulia 869a308bad modifica ai check delle impostazioni avanzate e ricompilata interfaccia 2020-01-25 19:02:53 +01:00
Giulia 89de6124c8 fottiti 2020-01-25 18:17:52 +01:00
Giulia 566853c61a aggiornato gitignore del codice 2020-01-25 18:17:43 +01:00
Giulia 50543f4076 aggiornato gitignore 2020-01-25 18:16:47 +01:00
Giulia 93d598fef8 fixato crash su modifica cartella destinazione 2020-01-25 18:13:23 +01:00
Giulia 1d37cdd89d ricompilate interfacce con modifiche varie 2020-01-25 18:13:04 +01:00
Giulia f002301707 cambiati import librerie slugify 2020-01-25 17:42:45 +01:00
Obbart c14f2dc4c9 collegamenti tra finestra titolo e avanzate titolo, cambiamenti nel file
configurazione per memorizzare le scelete delle finestre in modo
semplice
2020-01-02 17:42:11 +01:00
Obbart 19615367ea ricompilate interafcce 2020-01-02 16:45:47 +01:00
Obbart 104f8e4f7b aggiunti prefisso e suffisso alle avanzatenome 2020-01-02 16:45:28 +01:00
Obbart 066ca83b7f aggiunto try per parametro non valido 2020-01-02 15:50:10 +01:00
Obbart ada142809c i file del commit prima.. (FACEPALM) 2019-12-18 22:14:06 +01:00
Obbart 5aed922e77 salvataggio della configurazione corrente sullo stesso o un altro file 2019-12-18 22:13:41 +01:00
Obbart 22f1e8c967 rinominati file configurazione 2019-12-18 21:29:48 +01:00
Obbart 00cb8059cb modificato file di configurazione, aggiunto uno separato per le parole
chiave della lingua specifica
2019-12-18 21:27:48 +01:00
Obbart c6b5d7d8a5 riempie i nomi cartelle sorgente e destinazione 2019-12-18 21:19:20 +01:00
Obbart 21f869ccd0 modifica selezione cartelle selezione sorgente e destinazione 2019-12-18 21:14:44 +01:00
Obbart b2d3a03da8 lettura e settaggio dei parametri in modo ricorsivo funzionante 2019-12-18 21:00:15 +01:00
Obbart 705a6ce85c seguono modifiche al main per test parametri nuovo file di
configurazione
2019-12-18 19:43:46 +01:00
Obbart 12501c4edc ripensamenti sui file di configurazione, il logger legge un file
separato
2019-12-18 19:35:24 +01:00
Obbart fd9434868f modificato il getParam ma non mi viene in mente un modo furbo per fare
il set, ricorsivita' sul dizionario?
2019-12-16 22:47:59 +01:00
Obbart fdfb7bf377 ricompilate interfacce (si,ancora) 2019-12-16 21:40:37 +01:00
Obbart 43f8568904 risistemato caricamento interfacce (si, ancora) 2019-12-16 21:40:21 +01:00
Obbart 8564bdd723 ricompilazione interfacce con alcuni cambiamenti ai nomi delle finestre 2019-12-16 21:28:15 +01:00
Obbart 3396ee0a07 sistemato il caricamento delle interfacce che servono 2019-12-16 21:27:49 +01:00
Obbart da6c84e87f prima integrazione nuove interfacce, non ho capito bene come collegarle
a quella principale
2019-12-15 22:27:47 +01:00
Obbart d25bf776ac mannaggia quanti file nuovi da compilare!
comunque compilato tutto a posto, il pasticcio dei commit si e' risolto
2019-12-14 17:20:49 +01:00
Obbart e0ce388da9 aggiornato .gitignore 2019-12-14 17:20:40 +01:00
Giulia 5bb6a12a06 ahahahahahah (Niccolò). Creato pagina opzioni avanzate per rendere
predefiniti tutti i valori. Bisognerebbe sistemare il layout, ma non
siamo molto buoni.
2019-12-14 15:56:29 +01:00
Giulia c3704ad6bd Versione 3 della finestra avanzate titolo (Giulia). Rimettiamo a te la
scelta.
2019-12-14 15:55:27 +01:00
Giulia cc16f00a80 Versione 2 della finestra avanzate titolo (Niccolò). 2019-12-14 15:54:50 +01:00
Giulia d724fcbfd6 Modificato nomi bottoni ok annulla. 2019-12-14 15:54:24 +01:00
Giulia 07777f2a11 Nominato i bottoni rad. 2019-12-14 15:54:04 +01:00
Giulia 7becc034ef Aggiunto opzione selezione lingua articoli. 2019-12-14 15:53:36 +01:00
Giulia 158a427658 Tolto opzione di rendere predefinite le cartelle (messe da un'altra
parte, vedi sotto). Aggiunto tendina opzioni avanzate.
2019-12-14 15:53:10 +01:00
Giulia a85c99b51e sistemato gitignore secondo tue indicazioni telefoniche. 2019-12-14 15:52:14 +01:00
Obbart 608886d706 primo commit dal merge, aggiunti i file di progetto altrimenti si
dimentica gli import
2019-12-13 16:34:00 +01:00
Obbart d2096976fb merge con il brance lib-devel 2019-12-13 16:20:34 +01:00
Obbart a6aeee5d89 modifiche interfaccia + dialoghi per selezione cartelle, pronto per il
merge
2019-12-13 16:11:38 +01:00
Obbart cf173843d2 prima del checkout di gui-devel 2019-12-13 15:31:15 +01:00
Obbart d8808ddf5b funziona la pulizia automatica delle cartelle prima del salvataggio,
credo sia pronto per il merge
2019-12-13 15:27:31 +01:00
Obbart b5ee32e924 primo svuotamento automatico della cartella di uscita 2019-12-13 14:39:45 +01:00
Obbart b69463a303 eliminato log inutile del numero file 2019-12-13 14:28:12 +01:00
Obbart 82710a73a3 corretta numerazione sequenziale dei file 2019-12-13 14:26:07 +01:00
Obbart 275101eed3 Il lancio di tanti thread concorrenti fa casino, il numero incrementale
del file non viene resettato per ogni thread (inspiegabile)
2019-12-13 12:34:02 +01:00
Obbart 3826c7d2d1 Ritorno a threading, il multiprocess vero per ora e' troppo difficile da
gestire dal punto di vista del logging
2019-12-13 12:18:46 +01:00
Obbart 377251b59f aggiornato gitignore 2019-12-05 23:10:00 +01:00
Obbart 428946e39a altre modifiche per uso del modulo multiprocessing, rimane il problema
del logging dai thread
2019-12-05 23:09:08 +01:00
Obbart c5662c8397 uso di multiprocessing al posto d threading per una concorrenza vera
serve? da decidere
2019-12-05 22:55:49 +01:00
Obbart e3307d8db5 correzioni procedura salvataggio file e cartelle 2019-12-05 20:26:50 +01:00
Obbart 01dd92e4da file separati vengono isolati in cartelle differenti 2019-12-02 20:12:00 +01:00
Obbart 8628c3dbfb risolti i problemi di parsign su file di esempio semplificato 2019-12-01 18:29:09 +01:00
Obbart d69a3d0628 semplificato file di test 2019-12-01 17:54:49 +01:00
Obbart b6000c49fd Il test lancia correttamente i moduli ma siamo tornati agli errori di
parsing, debug necessario...
2019-12-01 17:44:14 +01:00
Obbart 851dcf103d correzioni alla librerie 2019-12-01 17:17:48 +01:00
Obbart 4118ed82c3 aggiornate le configurazioni con path file di test 2019-12-01 17:17:37 +01:00
Obbart 435bb144ab aggiunti file di test 2019-12-01 17:17:16 +01:00
Obbart ccc06bc5f1 corretto un typo stupidissimo che mi ha fatto perdere un sacco di tempo 2019-12-01 17:04:55 +01:00
Obbart ef91f8d26a iniziano test librerie, modifiche file configurazione di test 2019-12-01 16:50:15 +01:00
Obbart fe75d99736 Inizia il testing della libreria 2019-12-01 16:21:23 +01:00
Obbart 86e5dcc135 correzioni finestra titolo 2019-12-01 16:10:26 +01:00
Obbart 6f96797190 genera interfaccia e passa le tab con avanti e indietro 2019-12-01 16:10:09 +01:00
Obbart a0ff77ff33 costruisce interfaccia + correzione nomi bottoni 2019-12-01 15:41:30 +01:00
Obbart 9425262e7a Prima generazione interfaccia con i moduli 2019-12-01 15:30:38 +01:00
Obbart 94f289a6e2 non risolve gli import di interfaccia 2019-12-01 14:52:43 +01:00
Obbart 1880d5bb7e modifiche a nomi e layout interfacce + ricompilazione 2019-12-01 14:43:40 +01:00
Obbart 8eedd2ac4b ricompilato con nuova destinazione 2019-12-01 14:28:01 +01:00
Obbart 9a7477a23e eliminate interfacce compilate con vecchia dir 2019-12-01 14:25:39 +01:00
Obbart 08240b63d8 modifiche allo script compilazione interfacce piu' cose gia' compilate
per i primi test
2019-11-24 18:45:59 +01:00
Obbart 2a0695f78c Aggiunto tool per la compilazione delle interfacce 2019-11-24 18:32:59 +01:00
Obbart 59f3e2d6b3 modifiche finestra main, ogni pagina diventa una tab 2019-11-24 16:47:15 +01:00
Obbart a4e550797c Aggiunta cartella TestFiles 2019-11-24 16:13:58 +01:00
Giulia da0eb61e2d inizio pagina avanzate per ordine nome file 2019-11-24 15:11:35 +01:00
Obbart 6e83ce559d Cambiamenti che non mi ricordo, mi hanno distratto nel mentre 2019-11-24 12:48:30 +01:00
Obbart 04a32c7bd1 weaponizzate le funzioni di salva file singolo e body 2019-11-24 12:32:23 +01:00
Obbart e6fb04a9e7 modifiche generiche 2019-11-23 15:11:44 +01:00
Obbart b53fb27a60 Porting del codice dal programma originale a libsplit
Poco Refactoring, il codice e' pressoche invariato e andra' sistemato in
futuro.
Predisposizione al multi-threading
2019-11-11 22:49:59 +01:00
Obbart ff9f85ad0b Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2019-11-10 20:03:45 +01:00
Obbart fd8ea3edc9 Corretto import interfaccia 2019-11-10 20:03:37 +01:00
Obbart 0bbb1947ee Prima scrittura libSPLIT 2019-11-10 20:01:47 +01:00
Obbart 7ca177f29a aggiunta getFiles 2019-11-10 19:50:48 +01:00
Obbart 1e8867182f Finalizzato caricamento file
aggiunta proprieta' in use per definire il file in uso attualmente,
modificabile a runtime per ogni file ingress
2019-11-10 19:49:23 +01:00
Niccolo 9e62197eba sistemato dettagli opzioni 2019-11-10 14:16:24 +01:00
Niccolo e3934c06d1 sistemato layout 2019-11-10 14:10:20 +01:00
Obbart a798f29b73 Prima versione gestore configurazioni 2019-11-10 12:49:49 +01:00
Giulia 16b4b307a9 Aggiunto scelta separatore parti nome file 2019-11-06 13:45:17 +01:00
Giulia 4d63c83278 Sistemato caratteri e diciture 2019-11-06 13:28:23 +01:00
Giulia 23bcc4de1e Finestra impostazione titolo 2019-11-03 10:41:21 +01:00
Giulia 207651bd5d Spostato pulsante avanti e opzioni 2019-11-03 10:01:39 +01:00
Obbart 59c41cc3ba Inizio scrittura confloader
integrazione del fancylogger e settings nel file di test
2019-11-02 19:53:27 +01:00
Obbart 07810fe569 Aggiunto nuovo main per lancio gui e versione compilata interfacce 2019-11-02 19:29:10 +01:00
Obbart f9551b34aa Aggiunto file spec a gitignore 2019-11-02 19:07:58 +01:00
Obbart 13b2d72be1 Modifiche interfaccia
Il tipo della finestra principale rimane mainWindow ma e' divisa in due
widget, quello sopra cambia a seconda del contesto mentre in quello
sotto rimane il log delle attivita' in corso
tutte le nuove viste che si vogliono aggiungere dovranno essere del tipo
QWidget
2019-11-02 19:05:49 +01:00
Obbart 18566dda2c modifiche varie 2019-11-02 18:43:20 +01:00
Obbart 59f11a2f8b Elimina i caratteri speciali dal file logger 2019-11-02 14:32:44 +01:00
Obbart dfcbef7ae4 FancyLogger funzionante e file di configurazione test 2019-11-02 14:29:48 +01:00
Obbart 0502d77c14 Primo commit della libsplit 2019-11-02 13:54:08 +01:00
Niccolo b7af353ab8 finestra selezione output limiti misure 2019-10-30 22:06:52 +01:00
Niccolo 3f5ef6c103 finestra selezione output base 2019-10-30 22:02:06 +01:00
Niccolo 21e7a29c33 Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2019-10-30 22:00:30 +01:00
Niccolo d01afc2ab3 finestra selezione output base 2019-10-30 21:58:52 +01:00
Obbart 9537530a34 Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2019-10-30 21:49:48 +01:00
Obbart c401518db5 eliminato confGiulia 2019-10-30 21:49:32 +01:00
Niccolo 22413c3fb2 Main window aggiornata 2019-10-30 21:42:42 +01:00
Niccolo bfbd0e8c79 ritorno alla normalità 2019-10-30 21:27:38 +01:00
Niccolo af880df5b3 test commit niccolo 2019-10-30 21:23:27 +01:00
Giulia 3624d21e90 Cartella con file configurazione su PC Giulia 2019-10-30 18:27:35 +01:00
Giulia 3c1aad543e Main window. Prima versione completa. 2019-10-30 18:23:39 +01:00
Giulia c5ee729683 Sistemato pulsanti cartelle 2019-10-30 18:09:41 +01:00
Obbart 56a509a5e6 Ricompilato versione 0.4b 2019-10-30 17:26:36 +01:00
Obbart 84a38d0cb3 fixata indentazione titolo, aggiunti file conf alla cartella di dist 2019-10-30 17:10:16 +01:00
Obbart 8ec7e5e835 spostata l'eliminazione dei vecchi file in un altro try 2019-10-30 16:59:05 +01:00
Obbart 4f05729782 spostati i file di config nella dir del progetto 2019-10-30 16:55:30 +01:00
Obbart d7321a5041 riaggiornato gitignore 2019-10-30 15:52:44 +01:00
Obbart a29aa4da91 rimossa cartella build 2019-10-30 15:52:01 +01:00
Obbart 170959e529 aggiornato gitignore 2019-10-30 15:50:23 +01:00
Obbart 3fa74f6ed9 rebuild exe 2019-10-30 15:47:58 +01:00
Obbart 2f1236449a Corretta la rimozione dei file 2019-10-30 15:44:49 +01:00
Giulia f43ed84d72 Prima prova.
Label cartelle sorgente e destinatario con pushbtn/icona che non so
mettere
2019-10-28 20:54:10 +01:00
Obbart 4057b31203 Aggiornate Abbreviazioni 2019-10-27 19:33:43 +01:00
Giulia 0ddd8af3bc tolta icona 2019-10-27 19:22:40 +01:00
Obbart eec006f6c5 Primo commit branch interfaccia grafica 2019-10-27 19:04:18 +01:00
Obbart 10f48a2303 Eliminato printutils 2019-10-27 19:02:22 +01:00
Utente 4dd8673d86 Prima Interfaccia 2019-10-27 18:42:02 +01:00
Obbart 1a9e9a7eac Dir Interfaccia grafica 2019-10-27 18:31:35 +01:00
Obbart 947c8e19ea abbreviazioni interfaccia Qt 2019-10-27 17:47:38 +01:00
Obbart 3e6745fdeb commit test 2 2019-10-27 17:16:14 +01:00
Obbart eebfefa0c3 commit test 2019-10-27 17:15:33 +01:00
Obbart 8bbaa144d8 Upload Archivio vecchie versioni e file build windows, ricordarsi di
riconfigurare la toolchain per gli exe
2019-10-09 19:56:25 +02:00
75 changed files with 108286 additions and 148 deletions
+8 -3
View File
@@ -1,3 +1,8 @@
/.DS_Store
/.project
/.pydevproject
./.project
./.pydevproject
.DS_Store
.settings
bananaSPLIT.exe.spec
bananaSPLIT/build
bananaSPLIT/conf/_*.json
TestFiles
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bananaSPLIT</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}</path>
<path>/${PROJECT_DIR_NAME}/bananaSPLIT/libbananasplit</path>
<path>/${PROJECT_DIR_NAME}/bananaSPLIT/UserInterface/compiledUI</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python36</pydev_property>
</pydev_project>
+1
View File
@@ -0,0 +1 @@
/org.eclipse.core.resources.prefs
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
encoding//bananaSPLIT/UserInterface/compiledUI/advopt.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/avanzatetitolo.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/avanzatetitolo2.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/avanzatetitolo3.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/mainwindow.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/resources_rc.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/selezout.py=utf-8
encoding//bananaSPLIT/UserInterface/compiledUI/titolow.py=utf-8
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
+22792
View File
File diff suppressed because it is too large Load Diff
+23149
View File
File diff suppressed because it is too large Load Diff
+30024
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.2",
"paths": {
"lastUsed": "linux.json",
"configurationPath": "./conf/",
"INworkPath": "C:/",
"OUTworkPath": "C:/",
"fileList": [
"bdlog.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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+76
View File
@@ -0,0 +1,76 @@
{
"Italiano": {
"dateWords": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
},
"English": {
"dateWords": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
}
}
+65
View File
@@ -0,0 +1,65 @@
{
"version": "v1.2",
"paths": {
"lastUsed": "linux",
"configurationPath": "./conf/",
"INworkPath": "/home/emanuele/Documents",
"OUTworkPath": "/home/emanuele/Documents",
"fileList": []
},
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"logFile": "D:\\Test\\bananaSPLIT.log",
"logFormat": "%(asctime)s|%(levelname)-8s| %(message)-50s",
"logTimeFormat": "%m-%d %H:%M:%S"
}
+68
View File
@@ -0,0 +1,68 @@
{
"version": "v1.2",
"paths": {
"lastUsed": "spiripacchio.json",
"configurationPath": "./conf/",
"INworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles/FileBastardi",
"OUTworkPath": "H:/",
"fileList": [
"Files(100)(1).txt",
"Files(100)(2).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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
Binary file not shown.
+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.3",
"paths": {
"lastUsed": "defaults.json",
"configurationPath": "./conf/",
"INworkPath": "C://",
"OUTworkPath": "C://",
"fileList": []
},
"docStruct": {
"fileVersNew": false,
"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": {
"winW": 800,
"winH": 700,
"encoding": "windows-1252",
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+76
View File
@@ -0,0 +1,76 @@
{
"Italiano": {
"dateWords": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
},
"English": {
"dateWords": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
}
}
+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.3",
"paths": {
"lastUsed": "linux.json",
"configurationPath": "./conf/",
"INworkPath": "/home/",
"OUTworkPath": "/home/",
"fileList": []
},
"docStruct": {
"fileVersNew": false,
"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": {
"winW": 800,
"winH": 700,
"encoding": "windows-1252",
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"logFile": "D:\\Test\\bananaSPLIT.log",
"logFormat": "%(asctime)s|%(levelname)-8s| %(message)-50s",
"logTimeFormat": "%m-%d %H:%M:%S"
}
+5 -5
View File
@@ -1,6 +1,6 @@
/@Archivio/
/build/
/dist/
/bananaSPLIT.exe.spec\
*.py[ocd]
/.DS_Store
build
dist
/bananaSPLIT.exe.spec
.project
.pyproject
Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>editconf</class>
<widget class="QDialog" name="editconf">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>500</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>500</height>
</size>
</property>
<property name="windowTitle">
<string>Opzioni Avanzate</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-smartphone-ram-100.png</normaloff>:/icons/icons8-smartphone-ram-100.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>ATTENZIONE!! Quello che scrivi qui potrebbe rompere tutto!</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Da grandi poteri derivano grandi responsabilita'</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="txt_confFile">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<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="QPushButton" name="btn_cancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_ok">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>advtitolo</class>
<widget class="QWidget" name="advtitolo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>400</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="2">
<spacer name="horizontalSpacer">
<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 row="0" column="0" colspan="2">
<widget class="QLabel" name="lbl_titoloschermata">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Modifica ordine elementi nome file</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QSpinBox" name="spn_data">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spn_titolo">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spn_numero">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="lbl_istruzioni">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Indica la posizione dell'elemento nel nome del file</string>
</property>
</widget>
</item>
<item row="3" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lbl_data">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Data</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_titolo">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Titolo</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_numero">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Numero</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="btn_avanti">
<property name="text">
<string>Avanti</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="btn_indietro">
<property name="text">
<string>Indietro</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>advtitolo2</class>
<widget class="QWidget" name="advtitolo2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>495</width>
<height>456</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="lbl_titoloschermata">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Modifica ordine elementi nome file</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QLabel" name="lbl_istruzioni">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Scegli l'ordine degli elementi nel nome file</string>
</property>
</widget>
</item>
<item row="3" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="rad_dtn">
<property name="text">
<string>Data, Titolo, Numero </string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_dnt">
<property name="text">
<string>Data, Numero, Titolo</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_tdn">
<property name="text">
<string>Titolo, Data, Numero</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_tnd">
<property name="text">
<string>Titolo, Numero, Data</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_ndt">
<property name="text">
<string>Numero, Data, Titolo</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_ntd">
<property name="text">
<string>Numero, Titolo, Data</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_dt">
<property name="text">
<string>Data, Titolo</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_dn">
<property name="text">
<string>Data, Numero</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_td">
<property name="text">
<string>Titolo, Data</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_tn">
<property name="text">
<string>Titolo, Numero</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_nd">
<property name="text">
<string>Numero, Data</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_nt">
<property name="text">
<string>Numero, Titolo</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="btn_annulla">
<property name="text">
<string>Annulla</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_ok">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<spacer name="horizontalSpacer">
<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>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>advtitolo3</class>
<widget class="QWidget" name="advtitolo3">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>524</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Avanzate Titolo</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-smartphone-ram-100.png</normaloff>:/icons/icons8-smartphone-ram-100.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="lbl_terzo">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>(Terzo Elemento)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_numeroterzo">
<property name="text">
<string>Numero</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_dataterzo">
<property name="text">
<string>Data</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_titoloterzo">
<property name="text">
<string>Titolo</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0">
<spacer name="horizontalSpacer">
<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 row="5" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lbl_secondo">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Secondo Elemento</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_numerosecondo">
<property name="text">
<string>Numero</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_datasecondo">
<property name="text">
<string>Data</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_titolosecondo">
<property name="text">
<string>Titolo</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="lbl_istruzioni">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Seleziona l'ordine degli elementi nel nomi file</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Prefisso Titolo</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="txt_prefisso">
<property name="inputMask">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>10</number>
</property>
</widget>
</item>
<item row="3" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lbl_primo">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Primo elemento</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_numeroprimo">
<property name="text">
<string>Numero</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_dataprimo">
<property name="text">
<string>Data</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rad_titoloprimo">
<property name="text">
<string>Titolo</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="lbl_titoloschermata">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Modifica ordine elementi nome file</string>
</property>
</widget>
</item>
<item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="btn_annulla">
<property name="text">
<string>Annulla</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_OK">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Suffisso Titolo</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="txt_suffisso">
<property name="maxLength">
<number>10</number>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

+24
View File
@@ -0,0 +1,24 @@
'''
Created on 24 nov 2019
@author: Emanuele Trabattoni
'''
import os, glob, subprocess
if __name__ == '__main__':
print(os.getcwd())
uifiles = glob.glob("*.ui")
for f in uifiles:
command = r"pyuic5.exe "+f
print(command)
rv = subprocess.run(command, capture_output=True)
fp = open(r".\compiledUI\\"+f.replace("ui","py"), 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
command = r'pyrcc5.exe '+'resources.qrc'
print (command)
rv = subprocess.run(command, capture_output=True)
fp = open(r".\compiledUI\\resources_rc.py", 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
pass
@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'advopt.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_editconf(object):
def setupUi(self, editconf):
editconf.setObjectName("editconf")
editconf.resize(600, 500)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(editconf.sizePolicy().hasHeightForWidth())
editconf.setSizePolicy(sizePolicy)
editconf.setMinimumSize(QtCore.QSize(600, 500))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons8-smartphone-ram-100.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
editconf.setWindowIcon(icon)
self.verticalLayout = QtWidgets.QVBoxLayout(editconf)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(editconf)
font = QtGui.QFont()
font.setPointSize(12)
self.label.setFont(font)
self.label.setTextFormat(QtCore.Qt.PlainText)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setWordWrap(True)
self.label.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.label_2 = QtWidgets.QLabel(editconf)
font = QtGui.QFont()
font.setPointSize(10)
self.label_2.setFont(font)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2")
self.verticalLayout.addWidget(self.label_2)
self.txt_confFile = QtWidgets.QPlainTextEdit(editconf)
font = QtGui.QFont()
font.setPointSize(11)
self.txt_confFile.setFont(font)
self.txt_confFile.setObjectName("txt_confFile")
self.verticalLayout.addWidget(self.txt_confFile)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.btn_cancel = QtWidgets.QPushButton(editconf)
self.btn_cancel.setObjectName("btn_cancel")
self.horizontalLayout.addWidget(self.btn_cancel)
self.btn_ok = QtWidgets.QPushButton(editconf)
self.btn_ok.setObjectName("btn_ok")
self.horizontalLayout.addWidget(self.btn_ok)
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(editconf)
QtCore.QMetaObject.connectSlotsByName(editconf)
def retranslateUi(self, editconf):
_translate = QtCore.QCoreApplication.translate
editconf.setWindowTitle(_translate("editconf", "Opzioni Avanzate"))
self.label.setText(_translate("editconf", "ATTENZIONE!! Quello che scrivi qui potrebbe rompere tutto!"))
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
@@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'avanzatetitolo.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_advtitolo(object):
def setupUi(self, advtitolo):
advtitolo.setObjectName("advtitolo")
advtitolo.resize(480, 400)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(advtitolo.sizePolicy().hasHeightForWidth())
advtitolo.setSizePolicy(sizePolicy)
self.gridLayout = QtWidgets.QGridLayout(advtitolo)
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 3, 2, 1, 1)
self.lbl_titoloschermata = QtWidgets.QLabel(advtitolo)
font = QtGui.QFont()
font.setPointSize(11)
self.lbl_titoloschermata.setFont(font)
self.lbl_titoloschermata.setObjectName("lbl_titoloschermata")
self.gridLayout.addWidget(self.lbl_titoloschermata, 0, 0, 1, 2)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.spn_data = QtWidgets.QSpinBox(advtitolo)
self.spn_data.setMinimum(0)
self.spn_data.setMaximum(3)
self.spn_data.setObjectName("spn_data")
self.verticalLayout.addWidget(self.spn_data)
self.spn_titolo = QtWidgets.QSpinBox(advtitolo)
self.spn_titolo.setMinimum(0)
self.spn_titolo.setMaximum(3)
self.spn_titolo.setObjectName("spn_titolo")
self.verticalLayout.addWidget(self.spn_titolo)
self.spn_numero = QtWidgets.QSpinBox(advtitolo)
self.spn_numero.setMinimum(0)
self.spn_numero.setMaximum(3)
self.spn_numero.setObjectName("spn_numero")
self.verticalLayout.addWidget(self.spn_numero)
self.gridLayout.addLayout(self.verticalLayout, 3, 1, 1, 1)
self.lbl_istruzioni = QtWidgets.QLabel(advtitolo)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_istruzioni.setFont(font)
self.lbl_istruzioni.setObjectName("lbl_istruzioni")
self.gridLayout.addWidget(self.lbl_istruzioni, 2, 0, 1, 2)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.lbl_data = QtWidgets.QLabel(advtitolo)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_data.setFont(font)
self.lbl_data.setObjectName("lbl_data")
self.verticalLayout_2.addWidget(self.lbl_data)
self.lbl_titolo = QtWidgets.QLabel(advtitolo)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_titolo.setFont(font)
self.lbl_titolo.setObjectName("lbl_titolo")
self.verticalLayout_2.addWidget(self.lbl_titolo)
self.lbl_numero = QtWidgets.QLabel(advtitolo)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_numero.setFont(font)
self.lbl_numero.setObjectName("lbl_numero")
self.verticalLayout_2.addWidget(self.lbl_numero)
self.gridLayout.addLayout(self.verticalLayout_2, 3, 0, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem1, 4, 0, 1, 1)
self.line = QtWidgets.QFrame(advtitolo)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 1, 0, 1, 2)
self.btn_avanti = QtWidgets.QPushButton(advtitolo)
self.btn_avanti.setObjectName("btn_avanti")
self.gridLayout.addWidget(self.btn_avanti, 5, 2, 1, 1)
self.btn_indietro = QtWidgets.QPushButton(advtitolo)
self.btn_indietro.setObjectName("btn_indietro")
self.gridLayout.addWidget(self.btn_indietro, 5, 1, 1, 1)
self.retranslateUi(advtitolo)
QtCore.QMetaObject.connectSlotsByName(advtitolo)
def retranslateUi(self, advtitolo):
_translate = QtCore.QCoreApplication.translate
advtitolo.setWindowTitle(_translate("advtitolo", "Form"))
self.lbl_titoloschermata.setText(_translate("advtitolo", "Modifica ordine elementi nome file"))
self.lbl_istruzioni.setText(_translate("advtitolo", "Indica la posizione dell\'elemento nel nome del file"))
self.lbl_data.setText(_translate("advtitolo", "Data"))
self.lbl_titolo.setText(_translate("advtitolo", "Titolo"))
self.lbl_numero.setText(_translate("advtitolo", "Numero"))
self.btn_avanti.setText(_translate("advtitolo", "Avanti"))
self.btn_indietro.setText(_translate("advtitolo", "Indietro"))
@@ -0,0 +1,116 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'avanzatetitolo2.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_advtitolo2(object):
def setupUi(self, advtitolo2):
advtitolo2.setObjectName("advtitolo2")
advtitolo2.resize(495, 456)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(advtitolo2.sizePolicy().hasHeightForWidth())
advtitolo2.setSizePolicy(sizePolicy)
self.gridLayout = QtWidgets.QGridLayout(advtitolo2)
self.gridLayout.setObjectName("gridLayout")
self.line = QtWidgets.QFrame(advtitolo2)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 1, 0, 1, 2)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.lbl_titoloschermata = QtWidgets.QLabel(advtitolo2)
font = QtGui.QFont()
font.setPointSize(11)
self.lbl_titoloschermata.setFont(font)
self.lbl_titoloschermata.setObjectName("lbl_titoloschermata")
self.gridLayout.addWidget(self.lbl_titoloschermata, 0, 0, 1, 2)
self.lbl_istruzioni = QtWidgets.QLabel(advtitolo2)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_istruzioni.setFont(font)
self.lbl_istruzioni.setObjectName("lbl_istruzioni")
self.gridLayout.addWidget(self.lbl_istruzioni, 2, 0, 1, 3)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.rad_dtn = QtWidgets.QRadioButton(advtitolo2)
self.rad_dtn.setObjectName("rad_dtn")
self.verticalLayout_2.addWidget(self.rad_dtn)
self.rad_dnt = QtWidgets.QRadioButton(advtitolo2)
self.rad_dnt.setObjectName("rad_dnt")
self.verticalLayout_2.addWidget(self.rad_dnt)
self.rad_tdn = QtWidgets.QRadioButton(advtitolo2)
self.rad_tdn.setObjectName("rad_tdn")
self.verticalLayout_2.addWidget(self.rad_tdn)
self.rad_tnd = QtWidgets.QRadioButton(advtitolo2)
self.rad_tnd.setObjectName("rad_tnd")
self.verticalLayout_2.addWidget(self.rad_tnd)
self.rad_ndt = QtWidgets.QRadioButton(advtitolo2)
self.rad_ndt.setObjectName("rad_ndt")
self.verticalLayout_2.addWidget(self.rad_ndt)
self.rad_ntd = QtWidgets.QRadioButton(advtitolo2)
self.rad_ntd.setObjectName("rad_ntd")
self.verticalLayout_2.addWidget(self.rad_ntd)
self.rad_dt = QtWidgets.QRadioButton(advtitolo2)
self.rad_dt.setObjectName("rad_dt")
self.verticalLayout_2.addWidget(self.rad_dt)
self.rad_dn = QtWidgets.QRadioButton(advtitolo2)
self.rad_dn.setObjectName("rad_dn")
self.verticalLayout_2.addWidget(self.rad_dn)
self.rad_td = QtWidgets.QRadioButton(advtitolo2)
self.rad_td.setObjectName("rad_td")
self.verticalLayout_2.addWidget(self.rad_td)
self.rad_tn = QtWidgets.QRadioButton(advtitolo2)
self.rad_tn.setObjectName("rad_tn")
self.verticalLayout_2.addWidget(self.rad_tn)
self.rad_nd = QtWidgets.QRadioButton(advtitolo2)
self.rad_nd.setObjectName("rad_nd")
self.verticalLayout_2.addWidget(self.rad_nd)
self.rad_nt = QtWidgets.QRadioButton(advtitolo2)
self.rad_nt.setObjectName("rad_nt")
self.verticalLayout_2.addWidget(self.rad_nt)
self.gridLayout.addLayout(self.verticalLayout_2, 3, 0, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_annulla = QtWidgets.QPushButton(advtitolo2)
self.btn_annulla.setObjectName("btn_annulla")
self.horizontalLayout.addWidget(self.btn_annulla)
self.btn_ok = QtWidgets.QPushButton(advtitolo2)
self.btn_ok.setObjectName("btn_ok")
self.horizontalLayout.addWidget(self.btn_ok)
self.gridLayout.addLayout(self.horizontalLayout, 5, 2, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem1, 5, 0, 1, 1)
self.retranslateUi(advtitolo2)
QtCore.QMetaObject.connectSlotsByName(advtitolo2)
def retranslateUi(self, advtitolo2):
_translate = QtCore.QCoreApplication.translate
advtitolo2.setWindowTitle(_translate("advtitolo2", "Form"))
self.lbl_titoloschermata.setText(_translate("advtitolo2", "Modifica ordine elementi nome file"))
self.lbl_istruzioni.setText(_translate("advtitolo2", "Scegli l\'ordine degli elementi nel nome file"))
self.rad_dtn.setText(_translate("advtitolo2", "Data, Titolo, Numero "))
self.rad_dnt.setText(_translate("advtitolo2", "Data, Numero, Titolo"))
self.rad_tdn.setText(_translate("advtitolo2", "Titolo, Data, Numero"))
self.rad_tnd.setText(_translate("advtitolo2", "Titolo, Numero, Data"))
self.rad_ndt.setText(_translate("advtitolo2", "Numero, Data, Titolo"))
self.rad_ntd.setText(_translate("advtitolo2", "Numero, Titolo, Data"))
self.rad_dt.setText(_translate("advtitolo2", "Data, Titolo"))
self.rad_dn.setText(_translate("advtitolo2", "Data, Numero"))
self.rad_td.setText(_translate("advtitolo2", "Titolo, Data"))
self.rad_tn.setText(_translate("advtitolo2", "Titolo, Numero"))
self.rad_nd.setText(_translate("advtitolo2", "Numero, Data"))
self.rad_nt.setText(_translate("advtitolo2", "Numero, Titolo"))
self.btn_annulla.setText(_translate("advtitolo2", "Annulla"))
self.btn_ok.setText(_translate("advtitolo2", "OK"))
@@ -0,0 +1,160 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'avanzatetitolo3.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_advtitolo3(object):
def setupUi(self, advtitolo3):
advtitolo3.setObjectName("advtitolo3")
advtitolo3.setWindowModality(QtCore.Qt.WindowModal)
advtitolo3.resize(480, 524)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(advtitolo3.sizePolicy().hasHeightForWidth())
advtitolo3.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons8-smartphone-ram-100.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
advtitolo3.setWindowIcon(icon)
self.gridLayout = QtWidgets.QGridLayout(advtitolo3)
self.gridLayout.setObjectName("gridLayout")
self.line = QtWidgets.QFrame(advtitolo3)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 1, 0, 1, 2)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.lbl_terzo = QtWidgets.QLabel(advtitolo3)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_terzo.setFont(font)
self.lbl_terzo.setObjectName("lbl_terzo")
self.verticalLayout_3.addWidget(self.lbl_terzo)
self.rad_numeroterzo = QtWidgets.QCheckBox(advtitolo3)
self.rad_numeroterzo.setObjectName("rad_numeroterzo")
self.verticalLayout_3.addWidget(self.rad_numeroterzo)
self.rad_dataterzo = QtWidgets.QCheckBox(advtitolo3)
self.rad_dataterzo.setObjectName("rad_dataterzo")
self.verticalLayout_3.addWidget(self.rad_dataterzo)
self.rad_titoloterzo = QtWidgets.QCheckBox(advtitolo3)
self.rad_titoloterzo.setChecked(True)
self.rad_titoloterzo.setObjectName("rad_titoloterzo")
self.verticalLayout_3.addWidget(self.rad_titoloterzo)
self.gridLayout.addLayout(self.verticalLayout_3, 6, 0, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 10, 0, 1, 1)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.lbl_secondo = QtWidgets.QLabel(advtitolo3)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_secondo.setFont(font)
self.lbl_secondo.setObjectName("lbl_secondo")
self.verticalLayout.addWidget(self.lbl_secondo)
self.rad_numerosecondo = QtWidgets.QCheckBox(advtitolo3)
self.rad_numerosecondo.setObjectName("rad_numerosecondo")
self.verticalLayout.addWidget(self.rad_numerosecondo)
self.rad_datasecondo = QtWidgets.QCheckBox(advtitolo3)
self.rad_datasecondo.setChecked(True)
self.rad_datasecondo.setObjectName("rad_datasecondo")
self.verticalLayout.addWidget(self.rad_datasecondo)
self.rad_titolosecondo = QtWidgets.QCheckBox(advtitolo3)
self.rad_titolosecondo.setObjectName("rad_titolosecondo")
self.verticalLayout.addWidget(self.rad_titolosecondo)
self.gridLayout.addLayout(self.verticalLayout, 5, 0, 1, 1)
self.lbl_istruzioni = QtWidgets.QLabel(advtitolo3)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_istruzioni.setFont(font)
self.lbl_istruzioni.setObjectName("lbl_istruzioni")
self.gridLayout.addWidget(self.lbl_istruzioni, 2, 0, 1, 2)
self.label = QtWidgets.QLabel(advtitolo3)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 8, 0, 1, 1)
self.txt_prefisso = QtWidgets.QLineEdit(advtitolo3)
self.txt_prefisso.setInputMask("")
self.txt_prefisso.setText("")
self.txt_prefisso.setMaxLength(10)
self.txt_prefisso.setObjectName("txt_prefisso")
self.gridLayout.addWidget(self.txt_prefisso, 8, 1, 1, 1)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.lbl_primo = QtWidgets.QLabel(advtitolo3)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_primo.setFont(font)
self.lbl_primo.setObjectName("lbl_primo")
self.verticalLayout_2.addWidget(self.lbl_primo)
self.rad_numeroprimo = QtWidgets.QCheckBox(advtitolo3)
self.rad_numeroprimo.setChecked(False)
self.rad_numeroprimo.setObjectName("rad_numeroprimo")
self.verticalLayout_2.addWidget(self.rad_numeroprimo)
self.rad_dataprimo = QtWidgets.QCheckBox(advtitolo3)
self.rad_dataprimo.setObjectName("rad_dataprimo")
self.verticalLayout_2.addWidget(self.rad_dataprimo)
self.rad_titoloprimo = QtWidgets.QCheckBox(advtitolo3)
self.rad_titoloprimo.setObjectName("rad_titoloprimo")
self.verticalLayout_2.addWidget(self.rad_titoloprimo)
self.gridLayout.addLayout(self.verticalLayout_2, 3, 0, 1, 1)
self.line_2 = QtWidgets.QFrame(advtitolo3)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout.addWidget(self.line_2, 7, 0, 1, 2)
self.lbl_titoloschermata = QtWidgets.QLabel(advtitolo3)
font = QtGui.QFont()
font.setPointSize(11)
self.lbl_titoloschermata.setFont(font)
self.lbl_titoloschermata.setObjectName("lbl_titoloschermata")
self.gridLayout.addWidget(self.lbl_titoloschermata, 0, 0, 1, 2)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_annulla = QtWidgets.QPushButton(advtitolo3)
self.btn_annulla.setObjectName("btn_annulla")
self.horizontalLayout.addWidget(self.btn_annulla)
self.btn_OK = QtWidgets.QPushButton(advtitolo3)
self.btn_OK.setObjectName("btn_OK")
self.horizontalLayout.addWidget(self.btn_OK)
self.gridLayout.addLayout(self.horizontalLayout, 10, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(advtitolo3)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 9, 0, 1, 1)
self.txt_suffisso = QtWidgets.QLineEdit(advtitolo3)
self.txt_suffisso.setMaxLength(10)
self.txt_suffisso.setObjectName("txt_suffisso")
self.gridLayout.addWidget(self.txt_suffisso, 9, 1, 1, 1)
self.retranslateUi(advtitolo3)
QtCore.QMetaObject.connectSlotsByName(advtitolo3)
def retranslateUi(self, advtitolo3):
_translate = QtCore.QCoreApplication.translate
advtitolo3.setWindowTitle(_translate("advtitolo3", "Avanzate Titolo"))
self.lbl_terzo.setText(_translate("advtitolo3", "(Terzo Elemento)"))
self.rad_numeroterzo.setText(_translate("advtitolo3", "Numero"))
self.rad_dataterzo.setText(_translate("advtitolo3", "Data"))
self.rad_titoloterzo.setText(_translate("advtitolo3", "Titolo"))
self.lbl_secondo.setText(_translate("advtitolo3", "Secondo Elemento"))
self.rad_numerosecondo.setText(_translate("advtitolo3", "Numero"))
self.rad_datasecondo.setText(_translate("advtitolo3", "Data"))
self.rad_titolosecondo.setText(_translate("advtitolo3", "Titolo"))
self.lbl_istruzioni.setText(_translate("advtitolo3", "Seleziona l\'ordine degli elementi nel nomi file"))
self.label.setText(_translate("advtitolo3", "Prefisso Titolo"))
self.lbl_primo.setText(_translate("advtitolo3", "Primo elemento"))
self.rad_numeroprimo.setText(_translate("advtitolo3", "Numero"))
self.rad_dataprimo.setText(_translate("advtitolo3", "Data"))
self.rad_titoloprimo.setText(_translate("advtitolo3", "Titolo"))
self.lbl_titoloschermata.setText(_translate("advtitolo3", "Modifica ordine elementi nome file"))
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
@@ -0,0 +1,294 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_mainwin(object):
def setupUi(self, mainwin):
mainwin.setObjectName("mainwin")
mainwin.setEnabled(True)
mainwin.resize(680, 620)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(mainwin.sizePolicy().hasHeightForWidth())
mainwin.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("MS Shell Dlg 2")
font.setPointSize(10)
mainwin.setFont(font)
mainwin.setFocusPolicy(QtCore.Qt.NoFocus)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons8-banana-split-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
mainwin.setWindowIcon(icon)
mainwin.setAnimated(False)
mainwin.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks)
self.centralwidget = QtWidgets.QWidget(mainwin)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
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)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.label_3 = QtWidgets.QLabel(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.horizontalLayout_3.addWidget(self.label_3)
self.lbl_preset = QtWidgets.QLabel(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_preset.sizePolicy().hasHeightForWidth())
self.lbl_preset.setSizePolicy(sizePolicy)
self.lbl_preset.setObjectName("lbl_preset")
self.horizontalLayout_3.addWidget(self.lbl_preset)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem1)
self.gridLayout_2.addLayout(self.horizontalLayout_3, 2, 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, 4, 0, 1, 1)
self.wgt_main = QtWidgets.QTabWidget(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.wgt_main.sizePolicy().hasHeightForWidth())
self.wgt_main.setSizePolicy(sizePolicy)
self.wgt_main.setObjectName("wgt_main")
self.wgt_mainPage1 = QtWidgets.QWidget()
self.wgt_mainPage1.setObjectName("wgt_mainPage1")
self.gridLayout = QtWidgets.QGridLayout(self.wgt_mainPage1)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.btn_cartellasorg = QtWidgets.QPushButton(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.btn_cartellasorg.sizePolicy().hasHeightForWidth())
self.btn_cartellasorg.setSizePolicy(sizePolicy)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/icons8-add-folder-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_cartellasorg.setIcon(icon1)
self.btn_cartellasorg.setIconSize(QtCore.QSize(30, 30))
self.btn_cartellasorg.setFlat(True)
self.btn_cartellasorg.setObjectName("btn_cartellasorg")
self.verticalLayout_2.addWidget(self.btn_cartellasorg)
self.btn_cartelladest = QtWidgets.QPushButton(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.btn_cartelladest.sizePolicy().hasHeightForWidth())
self.btn_cartelladest.setSizePolicy(sizePolicy)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icons/icons8-downloads-folder-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_cartelladest.setIcon(icon2)
self.btn_cartelladest.setIconSize(QtCore.QSize(30, 30))
self.btn_cartelladest.setFlat(True)
self.btn_cartelladest.setObjectName("btn_cartelladest")
self.verticalLayout_2.addWidget(self.btn_cartelladest)
self.gridLayout.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.lbl_cartellasorg = QtWidgets.QLabel(self.wgt_mainPage1)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_cartellasorg.setFont(font)
self.lbl_cartellasorg.setObjectName("lbl_cartellasorg")
self.verticalLayout.addWidget(self.lbl_cartellasorg)
self.lbl_cartelladest = QtWidgets.QLabel(self.wgt_mainPage1)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_cartelladest.setFont(font)
self.lbl_cartelladest.setObjectName("lbl_cartelladest")
self.verticalLayout.addWidget(self.lbl_cartelladest)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.lbl_sorg = QtWidgets.QLabel(self.wgt_mainPage1)
self.lbl_sorg.setObjectName("lbl_sorg")
self.verticalLayout_4.addWidget(self.lbl_sorg)
self.lbl_dest = QtWidgets.QLabel(self.wgt_mainPage1)
self.lbl_dest.setObjectName("lbl_dest")
self.verticalLayout_4.addWidget(self.lbl_dest)
self.gridLayout.addLayout(self.verticalLayout_4, 0, 2, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem2, 0, 3, 1, 1)
self.line = QtWidgets.QFrame(self.wgt_mainPage1)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 1, 0, 1, 4)
self.label = QtWidgets.QLabel(self.wgt_mainPage1)
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 2, 0, 1, 4)
self.lst_files = QtWidgets.QListWidget(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lst_files.sizePolicy().hasHeightForWidth())
self.lst_files.setSizePolicy(sizePolicy)
self.lst_files.setMinimumSize(QtCore.QSize(0, 180))
self.lst_files.setObjectName("lst_files")
self.gridLayout.addWidget(self.lst_files, 3, 0, 1, 4)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_2 = QtWidgets.QLabel(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setObjectName("label_2")
self.horizontalLayout_2.addWidget(self.label_2)
self.rad_fileNew = QtWidgets.QRadioButton(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_fileNew.sizePolicy().hasHeightForWidth())
self.rad_fileNew.setSizePolicy(sizePolicy)
self.rad_fileNew.setChecked(True)
self.rad_fileNew.setObjectName("rad_fileNew")
self.horizontalLayout_2.addWidget(self.rad_fileNew)
self.rad_fileOld = QtWidgets.QRadioButton(self.wgt_mainPage1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_fileOld.sizePolicy().hasHeightForWidth())
self.rad_fileOld.setSizePolicy(sizePolicy)
self.rad_fileOld.setObjectName("rad_fileOld")
self.horizontalLayout_2.addWidget(self.rad_fileOld)
self.btn_avanti = QtWidgets.QPushButton(self.wgt_mainPage1)
self.btn_avanti.setMinimumSize(QtCore.QSize(100, 40))
self.btn_avanti.setMaximumSize(QtCore.QSize(80, 16777215))
font = QtGui.QFont()
font.setPointSize(11)
self.btn_avanti.setFont(font)
self.btn_avanti.setLayoutDirection(QtCore.Qt.RightToLeft)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/icons/icons8-arrow-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_avanti.setIcon(icon3)
self.btn_avanti.setIconSize(QtCore.QSize(25, 25))
self.btn_avanti.setFlat(False)
self.btn_avanti.setObjectName("btn_avanti")
self.horizontalLayout_2.addWidget(self.btn_avanti)
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 4)
self.wgt_main.addTab(self.wgt_mainPage1, "")
self.gridLayout_2.addWidget(self.wgt_main, 1, 0, 1, 1)
mainwin.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(mainwin)
self.menubar.setGeometry(QtCore.QRect(0, 0, 680, 26))
self.menubar.setNativeMenuBar(True)
self.menubar.setObjectName("menubar")
self.bar_file = QtWidgets.QMenu(self.menubar)
self.bar_file.setObjectName("bar_file")
self.menuOpzioni = QtWidgets.QMenu(self.menubar)
self.menuOpzioni.setObjectName("menuOpzioni")
mainwin.setMenuBar(self.menubar)
self.actionCarica_Preset = QtWidgets.QAction(mainwin)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/icons/icons8-documents-folder-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionCarica_Preset.setIcon(icon4)
self.actionCarica_Preset.setIconVisibleInMenu(True)
self.actionCarica_Preset.setObjectName("actionCarica_Preset")
self.actionSalva_Preset = QtWidgets.QAction(mainwin)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/icons/icons8-save-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionSalva_Preset.setIcon(icon5)
self.actionSalva_Preset.setObjectName("actionSalva_Preset")
self.actionOpzioni = QtWidgets.QAction(mainwin)
self.actionOpzioni.setObjectName("actionOpzioni")
self.actionLingua = QtWidgets.QAction(mainwin)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/icons/icons8-globe-earth-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionLingua.setIcon(icon6)
self.actionLingua.setObjectName("actionLingua")
self.actionAvanzate = QtWidgets.QAction(mainwin)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/icons/icons8-smartphone-ram-100.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionAvanzate.setIcon(icon7)
self.actionAvanzate.setObjectName("actionAvanzate")
self.bar_file.addAction(self.actionCarica_Preset)
self.bar_file.addAction(self.actionSalva_Preset)
self.menuOpzioni.addAction(self.actionLingua)
self.menuOpzioni.addAction(self.actionAvanzate)
self.menubar.addAction(self.bar_file.menuAction())
self.menubar.addAction(self.menuOpzioni.menuAction())
self.retranslateUi(mainwin)
QtCore.QMetaObject.connectSlotsByName(mainwin)
def retranslateUi(self, mainwin):
_translate = QtCore.QCoreApplication.translate
mainwin.setWindowTitle(_translate("mainwin", "bananaSPLIT"))
self.label_4.setText(_translate("mainwin", "Finestra dei messaggi"))
self.label_3.setText(_translate("mainwin", "Preset corrente: "))
self.lbl_preset.setText(_translate("mainwin", "..."))
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"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\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; font-size:10pt;\"><br /></p></body></html>"))
self.btn_cartellasorg.setText(_translate("mainwin", "-> "))
self.btn_cartelladest.setText(_translate("mainwin", "-> "))
self.lbl_cartellasorg.setText(_translate("mainwin", "Cartella sorgente"))
self.lbl_cartelladest.setText(_translate("mainwin", "Cartella destinazione"))
self.lbl_sorg.setText(_translate("mainwin", "..."))
self.lbl_dest.setText(_translate("mainwin", "..."))
self.label.setText(_translate("mainwin", "File disponibili per la conversione"))
self.label_2.setText(_translate("mainwin", "Versione dei File"))
self.rad_fileNew.setText(_translate("mainwin", "Nuova"))
self.rad_fileOld.setText(_translate("mainwin", "Vecchia"))
self.btn_avanti.setText(_translate("mainwin", "Avanti"))
self.wgt_main.setTabText(self.wgt_main.indexOf(self.wgt_mainPage1), _translate("mainwin", "Selezione Input"))
self.bar_file.setTitle(_translate("mainwin", "File"))
self.menuOpzioni.setTitle(_translate("mainwin", "Opzioni"))
self.actionCarica_Preset.setText(_translate("mainwin", "Carica Preset"))
self.actionSalva_Preset.setText(_translate("mainwin", "Salva Preset"))
self.actionOpzioni.setText(_translate("mainwin", "Opzioni"))
self.actionLingua.setText(_translate("mainwin", "Lingua Interfaccia"))
self.actionAvanzate.setText(_translate("mainwin", "Avanzate"))
import resources_rc
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,222 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'selezout.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_selezout(object):
def setupUi(self, selezout):
selezout.setObjectName("selezout")
selezout.resize(718, 573)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(selezout)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.lbl_lingua = QtWidgets.QLabel(selezout)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_lingua.sizePolicy().hasHeightForWidth())
self.lbl_lingua.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_lingua.setFont(font)
self.lbl_lingua.setObjectName("lbl_lingua")
self.verticalLayout_2.addWidget(self.lbl_lingua)
self.line_2 = QtWidgets.QFrame(selezout)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.verticalLayout_2.addWidget(self.line_2)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.cmb_lingua = QtWidgets.QComboBox(selezout)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cmb_lingua.sizePolicy().hasHeightForWidth())
self.cmb_lingua.setSizePolicy(sizePolicy)
self.cmb_lingua.setFrame(True)
self.cmb_lingua.setModelColumn(0)
self.cmb_lingua.setObjectName("cmb_lingua")
self.horizontalLayout_3.addWidget(self.cmb_lingua)
spacerItem = QtWidgets.QSpacerItem(40, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.lbl_indicazioni = QtWidgets.QLabel(selezout)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_indicazioni.sizePolicy().hasHeightForWidth())
self.lbl_indicazioni.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_indicazioni.setFont(font)
self.lbl_indicazioni.setObjectName("lbl_indicazioni")
self.verticalLayout_2.addWidget(self.lbl_indicazioni)
self.line = QtWidgets.QFrame(selezout)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.verticalLayout_2.addWidget(self.line)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
self.verticalLayout.setObjectName("verticalLayout")
self.rad_mainbodyEFile = QtWidgets.QRadioButton(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.rad_mainbodyEFile.setFont(font)
self.rad_mainbodyEFile.setChecked(True)
self.rad_mainbodyEFile.setObjectName("rad_mainbodyEFile")
self.verticalLayout.addWidget(self.rad_mainbodyEFile)
self.rad_mainbody = QtWidgets.QRadioButton(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.rad_mainbody.setFont(font)
self.rad_mainbody.setObjectName("rad_mainbody")
self.verticalLayout.addWidget(self.rad_mainbody)
self.rad_file = QtWidgets.QRadioButton(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.rad_file.setFont(font)
self.rad_file.setObjectName("rad_file")
self.verticalLayout.addWidget(self.rad_file)
self.verticalLayout_2.addLayout(self.verticalLayout)
self.lbl_indicazioni_2 = QtWidgets.QLabel(selezout)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_indicazioni_2.sizePolicy().hasHeightForWidth())
self.lbl_indicazioni_2.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_indicazioni_2.setFont(font)
self.lbl_indicazioni_2.setObjectName("lbl_indicazioni_2")
self.verticalLayout_2.addWidget(self.lbl_indicazioni_2)
self.line_3 = QtWidgets.QFrame(selezout)
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.verticalLayout_2.addWidget(self.line_3)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.chk_removeDuplicates = QtWidgets.QCheckBox(selezout)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.chk_removeDuplicates.sizePolicy().hasHeightForWidth())
self.chk_removeDuplicates.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_removeDuplicates.setFont(font)
self.chk_removeDuplicates.setObjectName("chk_removeDuplicates")
self.gridLayout.addWidget(self.chk_removeDuplicates, 0, 0, 1, 1)
self.chk_includeTitle = QtWidgets.QCheckBox(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_includeTitle.setFont(font)
self.chk_includeTitle.setObjectName("chk_includeTitle")
self.gridLayout.addWidget(self.chk_includeTitle, 0, 1, 1, 1)
self.chk_removeBreakWord = QtWidgets.QCheckBox(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_removeBreakWord.setFont(font)
self.chk_removeBreakWord.setObjectName("chk_removeBreakWord")
self.gridLayout.addWidget(self.chk_removeBreakWord, 1, 0, 1, 1)
self.chk_cleaDestFolder = QtWidgets.QCheckBox(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_cleaDestFolder.setFont(font)
self.chk_cleaDestFolder.setObjectName("chk_cleaDestFolder")
self.gridLayout.addWidget(self.chk_cleaDestFolder, 1, 1, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(selezout)
font = QtGui.QFont()
font.setPointSize(10)
self.label.setFont(font)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.lin_specialChars = QtWidgets.QLineEdit(selezout)
self.lin_specialChars.setObjectName("lin_specialChars")
self.horizontalLayout.addWidget(self.lin_specialChars)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 2)
self.verticalLayout_2.addLayout(self.gridLayout)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_2.addItem(spacerItem2)
self.line_4 = QtWidgets.QFrame(selezout)
self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_4.setObjectName("line_4")
self.verticalLayout_2.addWidget(self.line_4)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.btn_indietro = QtWidgets.QPushButton(selezout)
self.btn_indietro.setMinimumSize(QtCore.QSize(100, 40))
self.btn_indietro.setMaximumSize(QtCore.QSize(75, 16777215))
font = QtGui.QFont()
font.setPointSize(11)
self.btn_indietro.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons8-arrow-80-back.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_indietro.setIcon(icon)
self.btn_indietro.setIconSize(QtCore.QSize(25, 25))
self.btn_indietro.setObjectName("btn_indietro")
self.horizontalLayout_2.addWidget(self.btn_indietro)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem3)
self.btn_split = QtWidgets.QPushButton(selezout)
self.btn_split.setMinimumSize(QtCore.QSize(100, 0))
self.btn_split.setMaximumSize(QtCore.QSize(16777215, 40))
font = QtGui.QFont()
font.setPointSize(12)
self.btn_split.setFont(font)
self.btn_split.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.btn_split.setLayoutDirection(QtCore.Qt.LeftToRight)
self.btn_split.setAutoFillBackground(False)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/icons8-banana-split-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_split.setIcon(icon1)
self.btn_split.setIconSize(QtCore.QSize(40, 40))
self.btn_split.setFlat(False)
self.btn_split.setObjectName("btn_split")
self.horizontalLayout_2.addWidget(self.btn_split)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.retranslateUi(selezout)
QtCore.QMetaObject.connectSlotsByName(selezout)
selezout.setTabOrder(self.cmb_lingua, self.rad_mainbodyEFile)
selezout.setTabOrder(self.rad_mainbodyEFile, self.rad_mainbody)
selezout.setTabOrder(self.rad_mainbody, self.rad_file)
selezout.setTabOrder(self.rad_file, self.chk_removeDuplicates)
selezout.setTabOrder(self.chk_removeDuplicates, self.chk_includeTitle)
selezout.setTabOrder(self.chk_includeTitle, self.chk_removeBreakWord)
selezout.setTabOrder(self.chk_removeBreakWord, self.chk_cleaDestFolder)
selezout.setTabOrder(self.chk_cleaDestFolder, self.lin_specialChars)
selezout.setTabOrder(self.lin_specialChars, self.btn_split)
selezout.setTabOrder(self.btn_split, self.btn_indietro)
def retranslateUi(self, selezout):
_translate = QtCore.QCoreApplication.translate
selezout.setWindowTitle(_translate("selezout", "Seleziona Linuga e Output"))
self.lbl_lingua.setText(_translate("selezout", "Seleziona la lingua degli articoli"))
self.lbl_indicazioni.setText(_translate("selezout", "Seleziona il tipo di file da salvare"))
self.rad_mainbodyEFile.setText(_translate("selezout", "Bodyfile + File singoli"))
self.rad_mainbody.setText(_translate("selezout", "Bodyfile"))
self.rad_file.setText(_translate("selezout", "File singoli"))
self.lbl_indicazioni_2.setText(_translate("selezout", "Altre Opzioni "))
self.chk_removeDuplicates.setText(_translate("selezout", "Tenta rimozione duplicati"))
self.chk_includeTitle.setText(_translate("selezout", "Includi titolo all\'interno del file"))
self.chk_removeBreakWord.setText(_translate("selezout", "Rimuovi interruzioni parola (a capo)"))
self.chk_cleaDestFolder.setText(_translate("selezout", "Svuota cartella di destinazione"))
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
@@ -0,0 +1,340 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'titolow.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_titolo(object):
def setupUi(self, titolo):
titolo.setObjectName("titolo")
titolo.resize(715, 567)
self.gridLayout = QtWidgets.QGridLayout(titolo)
self.gridLayout.setObjectName("gridLayout")
self.lyt_nchars = QtWidgets.QHBoxLayout()
self.lyt_nchars.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
self.lyt_nchars.setObjectName("lyt_nchars")
self.lbl_ncarat = QtWidgets.QLabel(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_ncarat.sizePolicy().hasHeightForWidth())
self.lbl_ncarat.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.lbl_ncarat.setFont(font)
self.lbl_ncarat.setObjectName("lbl_ncarat")
self.lyt_nchars.addWidget(self.lbl_ncarat)
self.spn_ncarat = QtWidgets.QSpinBox(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.spn_ncarat.sizePolicy().hasHeightForWidth())
self.spn_ncarat.setSizePolicy(sizePolicy)
self.spn_ncarat.setMinimumSize(QtCore.QSize(50, 0))
self.spn_ncarat.setWrapping(True)
self.spn_ncarat.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows)
self.spn_ncarat.setMinimum(3)
self.spn_ncarat.setMaximum(32)
self.spn_ncarat.setObjectName("spn_ncarat")
self.lyt_nchars.addWidget(self.spn_ncarat)
spacerItem = QtWidgets.QSpacerItem(40, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.lyt_nchars.addItem(spacerItem)
self.gridLayout.addLayout(self.lyt_nchars, 5, 0, 1, 3)
self.line_3 = QtWidgets.QFrame(titolo)
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.gridLayout.addWidget(self.line_3, 7, 0, 1, 3)
self.line = QtWidgets.QFrame(titolo)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 1, 0, 1, 3)
self.lyt_buttons = QtWidgets.QHBoxLayout()
self.lyt_buttons.setObjectName("lyt_buttons")
self.btn_avanzate = QtWidgets.QPushButton(titolo)
self.btn_avanzate.setMinimumSize(QtCore.QSize(120, 40))
font = QtGui.QFont()
font.setPointSize(11)
self.btn_avanzate.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons8-smartphone-ram-100.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_avanzate.setIcon(icon)
self.btn_avanzate.setIconSize(QtCore.QSize(30, 30))
self.btn_avanzate.setObjectName("btn_avanzate")
self.lyt_buttons.addWidget(self.btn_avanzate)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.lyt_buttons.addItem(spacerItem1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.btn_indietro = QtWidgets.QPushButton(titolo)
self.btn_indietro.setMinimumSize(QtCore.QSize(100, 40))
font = QtGui.QFont()
font.setPointSize(11)
self.btn_indietro.setFont(font)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/icons8-arrow-80-back.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_indietro.setIcon(icon1)
self.btn_indietro.setIconSize(QtCore.QSize(25, 25))
self.btn_indietro.setObjectName("btn_indietro")
self.horizontalLayout_2.addWidget(self.btn_indietro)
self.btn_avanti = QtWidgets.QPushButton(titolo)
self.btn_avanti.setMinimumSize(QtCore.QSize(100, 40))
font = QtGui.QFont()
font.setPointSize(11)
self.btn_avanti.setFont(font)
self.btn_avanti.setLayoutDirection(QtCore.Qt.RightToLeft)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icons/icons8-arrow-80.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_avanti.setIcon(icon2)
self.btn_avanti.setIconSize(QtCore.QSize(25, 25))
self.btn_avanti.setObjectName("btn_avanti")
self.horizontalLayout_2.addWidget(self.btn_avanti)
self.lyt_buttons.addLayout(self.horizontalLayout_2)
self.gridLayout.addLayout(self.lyt_buttons, 15, 0, 1, 3)
self.lyt_date = QtWidgets.QVBoxLayout()
self.lyt_date.setObjectName("lyt_date")
self.rad_datajpn = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_datajpn.sizePolicy().hasHeightForWidth())
self.rad_datajpn.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_datajpn.setFont(font)
self.rad_datajpn.setChecked(True)
self.rad_datajpn.setObjectName("rad_datajpn")
self.lyt_date.addWidget(self.rad_datajpn)
self.rad_dataita = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_dataita.sizePolicy().hasHeightForWidth())
self.rad_dataita.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_dataita.setFont(font)
self.rad_dataita.setObjectName("rad_dataita")
self.lyt_date.addWidget(self.rad_dataita)
self.rad_datausa = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_datausa.sizePolicy().hasHeightForWidth())
self.rad_datausa.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_datausa.setFont(font)
self.rad_datausa.setObjectName("rad_datausa")
self.lyt_date.addWidget(self.rad_datausa)
self.gridLayout.addLayout(self.lyt_date, 3, 0, 1, 3)
self.lbl_impotit = QtWidgets.QLabel(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_impotit.sizePolicy().hasHeightForWidth())
self.lbl_impotit.setSizePolicy(sizePolicy)
self.lbl_impotit.setMinimumSize(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setPointSize(10)
self.lbl_impotit.setFont(font)
self.lbl_impotit.setObjectName("lbl_impotit")
self.gridLayout.addWidget(self.lbl_impotit, 0, 0, 1, 3)
self.chk_data = QtWidgets.QCheckBox(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.chk_data.sizePolicy().hasHeightForWidth())
self.chk_data.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_data.setFont(font)
self.chk_data.setObjectName("chk_data")
self.gridLayout.addWidget(self.chk_data, 2, 0, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem2, 9, 1, 1, 1)
self.chk_titolo = QtWidgets.QCheckBox(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.chk_titolo.sizePolicy().hasHeightForWidth())
self.chk_titolo.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_titolo.setFont(font)
self.chk_titolo.setObjectName("chk_titolo")
self.gridLayout.addWidget(self.chk_titolo, 4, 0, 1, 2)
self.lyt_sep = QtWidgets.QFormLayout()
self.lyt_sep.setObjectName("lyt_sep")
self.rad_spazio = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_spazio.sizePolicy().hasHeightForWidth())
self.rad_spazio.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_spazio.setFont(font)
self.rad_spazio.setObjectName("rad_spazio")
self.btngrp_divisore = QtWidgets.QButtonGroup(titolo)
self.btngrp_divisore.setObjectName("btngrp_divisore")
self.btngrp_divisore.addButton(self.rad_spazio)
self.lyt_sep.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.rad_spazio)
self.rad_virgola = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_virgola.sizePolicy().hasHeightForWidth())
self.rad_virgola.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_virgola.setFont(font)
self.rad_virgola.setObjectName("rad_virgola")
self.btngrp_divisore.addButton(self.rad_virgola)
self.lyt_sep.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.rad_virgola)
self.rad_piu = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_piu.sizePolicy().hasHeightForWidth())
self.rad_piu.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_piu.setFont(font)
self.rad_piu.setObjectName("rad_piu")
self.btngrp_divisore.addButton(self.rad_piu)
self.lyt_sep.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.rad_piu)
self.rad_tratt = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_tratt.sizePolicy().hasHeightForWidth())
self.rad_tratt.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_tratt.setFont(font)
self.rad_tratt.setObjectName("rad_tratt")
self.btngrp_divisore.addButton(self.rad_tratt)
self.lyt_sep.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.rad_tratt)
self.rad_trattbass = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_trattbass.sizePolicy().hasHeightForWidth())
self.rad_trattbass.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_trattbass.setFont(font)
self.rad_trattbass.setObjectName("rad_trattbass")
self.btngrp_divisore.addButton(self.rad_trattbass)
self.lyt_sep.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.rad_trattbass)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.rad_altro = QtWidgets.QRadioButton(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rad_altro.sizePolicy().hasHeightForWidth())
self.rad_altro.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.rad_altro.setFont(font)
self.rad_altro.setObjectName("rad_altro")
self.btngrp_divisore.addButton(self.rad_altro)
self.horizontalLayout_4.addWidget(self.rad_altro)
self.lin_altro = QtWidgets.QLineEdit(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lin_altro.sizePolicy().hasHeightForWidth())
self.lin_altro.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.lin_altro.setFont(font)
self.lin_altro.setText("")
self.lin_altro.setObjectName("lin_altro")
self.horizontalLayout_4.addWidget(self.lin_altro)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem3)
self.lyt_sep.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_4)
self.gridLayout.addLayout(self.lyt_sep, 9, 0, 1, 1)
self.label = QtWidgets.QLabel(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.label.setFont(font)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 8, 0, 1, 2)
self.line_2 = QtWidgets.QFrame(titolo)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout.addWidget(self.line_2, 14, 0, 1, 3)
self.chk_docnum = QtWidgets.QCheckBox(titolo)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.chk_docnum.sizePolicy().hasHeightForWidth())
self.chk_docnum.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.chk_docnum.setFont(font)
self.chk_docnum.setChecked(True)
self.chk_docnum.setObjectName("chk_docnum")
self.gridLayout.addWidget(self.chk_docnum, 6, 0, 1, 2)
spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem4, 13, 0, 1, 1)
self.retranslateUi(titolo)
QtCore.QMetaObject.connectSlotsByName(titolo)
titolo.setTabOrder(self.chk_data, self.rad_datajpn)
titolo.setTabOrder(self.rad_datajpn, self.rad_dataita)
titolo.setTabOrder(self.rad_dataita, self.rad_datausa)
titolo.setTabOrder(self.rad_datausa, self.chk_titolo)
titolo.setTabOrder(self.chk_titolo, self.spn_ncarat)
titolo.setTabOrder(self.spn_ncarat, self.chk_docnum)
titolo.setTabOrder(self.chk_docnum, self.rad_spazio)
titolo.setTabOrder(self.rad_spazio, self.rad_tratt)
titolo.setTabOrder(self.rad_tratt, self.rad_virgola)
titolo.setTabOrder(self.rad_virgola, self.rad_trattbass)
titolo.setTabOrder(self.rad_trattbass, self.rad_piu)
titolo.setTabOrder(self.rad_piu, self.rad_altro)
titolo.setTabOrder(self.rad_altro, self.lin_altro)
titolo.setTabOrder(self.lin_altro, self.btn_avanzate)
titolo.setTabOrder(self.btn_avanzate, self.btn_avanti)
titolo.setTabOrder(self.btn_avanti, self.btn_indietro)
def retranslateUi(self, titolo):
_translate = QtCore.QCoreApplication.translate
titolo.setWindowTitle(_translate("titolo", "Nomi file di Uscita"))
self.lbl_ncarat.setText(_translate("titolo", "Numero di caratteri"))
self.btn_avanzate.setText(_translate("titolo", "Avanzate Titolo"))
self.btn_indietro.setText(_translate("titolo", "Indietro"))
self.btn_avanti.setText(_translate("titolo", "Avanti"))
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 (ita)"))
self.rad_datausa.setText(_translate("titolo", "MM DD YYYY, es. 12 31 2000 (us)"))
self.lbl_impotit.setText(_translate("titolo", "Impostazioni nome file in uscita"))
self.chk_data.setText(_translate("titolo", "Data"))
self.chk_titolo.setText(_translate("titolo", "Titolo articolo"))
self.rad_spazio.setText(_translate("titolo", "Spazio"))
self.rad_virgola.setText(_translate("titolo", ","))
self.rad_piu.setText(_translate("titolo", "+"))
self.rad_tratt.setText(_translate("titolo", "-"))
self.rad_trattbass.setText(_translate("titolo", "_"))
self.rad_altro.setText(_translate("titolo", "Altro:"))
self.label.setText(_translate("titolo", "Separatore"))
self.chk_docnum.setText(_translate("titolo", "Numero documento"))
import resources_rc
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+501
View File
@@ -0,0 +1,501 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>mainwin</class>
<widget class="QMainWindow" name="mainwin">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>620</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>MS Shell Dlg 2</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="windowTitle">
<string>bananaSPLIT</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-banana-split-80.png</normaloff>:/icons/icons8-banana-split-80.png</iconset>
</property>
<property name="animated">
<bool>false</bool>
</property>
<property name="dockOptions">
<set>QMainWindow::AllowTabbedDocks</set>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" 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>
<item row="4" column="0">
<widget class="QTextEdit" name="txt_log">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(0,0,0);</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="wgt_main">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QWidget" name="wgt_mainPage1">
<attribute name="title">
<string>Selezione Input</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QPushButton" name="btn_cartellasorg">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-&gt; </string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-add-folder-80.png</normaloff>:/icons/icons8-add-folder-80.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_cartelladest">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-&gt; </string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-downloads-folder-80.png</normaloff>:/icons/icons8-downloads-folder-80.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lbl_cartellasorg">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Cartella sorgente</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_cartelladest">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Cartella destinazione</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="lbl_sorg">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_dest">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
<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 row="1" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" colspan="4">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>File disponibili per la conversione</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0" colspan="4">
<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>180</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Versione dei File</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_fileNew">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Nuova</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_fileOld">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Vecchia</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_avanti">
<property name="minimumSize">
<size>
<width>100</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Avanti</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-arrow-80.png</normaloff>:/icons/icons8-arrow-80.png</iconset>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>26</height>
</rect>
</property>
<property name="nativeMenuBar">
<bool>true</bool>
</property>
<widget class="QMenu" name="bar_file">
<property name="title">
<string>File</string>
</property>
<addaction name="actionCarica_Preset"/>
<addaction name="actionSalva_Preset"/>
</widget>
<widget class="QMenu" name="menuOpzioni">
<property name="title">
<string>Opzioni</string>
</property>
<addaction name="actionLingua"/>
<addaction name="actionAvanzate"/>
</widget>
<addaction name="bar_file"/>
<addaction name="menuOpzioni"/>
</widget>
<action name="actionCarica_Preset">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-documents-folder-80.png</normaloff>:/icons/icons8-documents-folder-80.png</iconset>
</property>
<property name="text">
<string>Carica Preset</string>
</property>
<property name="iconVisibleInMenu">
<bool>true</bool>
</property>
</action>
<action name="actionSalva_Preset">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-save-80.png</normaloff>:/icons/icons8-save-80.png</iconset>
</property>
<property name="text">
<string>Salva Preset</string>
</property>
</action>
<action name="actionOpzioni">
<property name="text">
<string>Opzioni</string>
</property>
</action>
<action name="actionLingua">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-globe-earth-80.png</normaloff>:/icons/icons8-globe-earth-80.png</iconset>
</property>
<property name="text">
<string>Lingua Interfaccia</string>
</property>
</action>
<action name="actionAvanzate">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-smartphone-ram-100.png</normaloff>:/icons/icons8-smartphone-ram-100.png</iconset>
</property>
<property name="text">
<string>Avanzate</string>
</property>
</action>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
+14
View File
@@ -0,0 +1,14 @@
<RCC>
<qresource prefix="icons">
<file>icons8-arrow-80-back.png</file>
<file>icons8-smartphone-ram-100.png</file>
<file>icons8-globe-earth-80.png</file>
<file>icons8-save-80.png</file>
<file>icons8-arrow-80.png</file>
<file>banana.ico</file>
<file>icons8-add-folder-80.png</file>
<file>icons8-banana-split-80.png</file>
<file>icons8-documents-folder-80.png</file>
<file>icons8-downloads-folder-80.png</file>
</qresource>
</RCC>
+400
View File
@@ -0,0 +1,400 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>selezout</class>
<widget class="QWidget" name="selezout">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>718</width>
<height>573</height>
</rect>
</property>
<property name="windowTitle">
<string>Seleziona Linuga e Output</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lbl_lingua">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Seleziona la lingua degli articoli</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QComboBox" name="cmb_lingua">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="modelColumn">
<number>0</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lbl_indicazioni">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Seleziona il tipo di file da salvare</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<widget class="QRadioButton" name="rad_mainbodyEFile">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Bodyfile + File singoli</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_mainbody">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Bodyfile</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_file">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>File singoli</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lbl_indicazioni_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Altre Opzioni </string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="chk_removeDuplicates">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Tenta rimozione duplicati</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chk_includeTitle">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Includi titolo all'interno del file</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chk_removeBreakWord">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Rimuovi interruzioni parola (a capo)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chk_cleaDestFolder">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Svuota cartella di destinazione</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Caratteri speciali da rimuovere </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lin_specialChars"/>
</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>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="btn_indietro">
<property name="minimumSize">
<size>
<width>100</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Indietro</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-arrow-80-back.png</normaloff>:/icons/icons8-arrow-80-back.png</iconset>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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="QPushButton" name="btn_split">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>SPLITTA!</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-banana-split-80.png</normaloff>:/icons/icons8-banana-split-80.png</iconset>
</property>
<property name="iconSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>cmb_lingua</tabstop>
<tabstop>rad_mainbodyEFile</tabstop>
<tabstop>rad_mainbody</tabstop>
<tabstop>rad_file</tabstop>
<tabstop>chk_removeDuplicates</tabstop>
<tabstop>chk_includeTitle</tabstop>
<tabstop>chk_removeBreakWord</tabstop>
<tabstop>chk_cleaDestFolder</tabstop>
<tabstop>lin_specialChars</tabstop>
<tabstop>btn_split</tabstop>
<tabstop>btn_indietro</tabstop>
</tabstops>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
+591
View File
@@ -0,0 +1,591 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>titolo</class>
<widget class="QWidget" name="titolo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>715</width>
<height>567</height>
</rect>
</property>
<property name="windowTitle">
<string>Nomi file di Uscita</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="5" column="0" colspan="3">
<layout class="QHBoxLayout" name="lyt_nchars">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item>
<widget class="QLabel" name="lbl_ncarat">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Numero di caratteri</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spn_ncarat">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="wrapping">
<bool>true</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>32</number>
</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>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="7" column="0" colspan="3">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="15" column="0" colspan="3">
<layout class="QHBoxLayout" name="lyt_buttons">
<item>
<widget class="QPushButton" name="btn_avanzate">
<property name="minimumSize">
<size>
<width>120</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Avanzate Titolo</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-smartphone-ram-100.png</normaloff>:/icons/icons8-smartphone-ram-100.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="btn_indietro">
<property name="minimumSize">
<size>
<width>100</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Indietro</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-arrow-80-back.png</normaloff>:/icons/icons8-arrow-80-back.png</iconset>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_avanti">
<property name="minimumSize">
<size>
<width>100</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Avanti</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons8-arrow-80.png</normaloff>:/icons/icons8-arrow-80.png</iconset>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="3" column="0" colspan="3">
<layout class="QVBoxLayout" name="lyt_date">
<item>
<widget class="QRadioButton" name="rad_datajpn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>YYYY MM DD, es. 2000 12 31 (jpn)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_dataita">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>DD MM YYYY, es. 31 12 2000 (ita)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_datausa">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>MM DD YYYY, es. 12 31 2000 (us)</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="lbl_impotit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Impostazioni nome file in uscita</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chk_data">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Data</string>
</property>
</widget>
</item>
<item row="9" column="1">
<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 row="4" column="0" colspan="2">
<widget class="QCheckBox" name="chk_titolo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Titolo articolo</string>
</property>
</widget>
</item>
<item row="9" column="0">
<layout class="QFormLayout" name="lyt_sep">
<item row="0" column="0">
<widget class="QRadioButton" name="rad_spazio">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Spazio</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="rad_virgola">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>,</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="rad_piu">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>+</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rad_tratt">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>-</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="rad_trattbass">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>_</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QRadioButton" name="rad_altro">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Altro:</string>
</property>
<attribute name="buttonGroup">
<string notr="true">btngrp_divisore</string>
</attribute>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lin_altro">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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>
</item>
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Separatore</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="chk_docnum">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Numero documento</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="13" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<tabstops>
<tabstop>chk_data</tabstop>
<tabstop>rad_datajpn</tabstop>
<tabstop>rad_dataita</tabstop>
<tabstop>rad_datausa</tabstop>
<tabstop>chk_titolo</tabstop>
<tabstop>spn_ncarat</tabstop>
<tabstop>chk_docnum</tabstop>
<tabstop>rad_spazio</tabstop>
<tabstop>rad_tratt</tabstop>
<tabstop>rad_virgola</tabstop>
<tabstop>rad_trattbass</tabstop>
<tabstop>rad_piu</tabstop>
<tabstop>rad_altro</tabstop>
<tabstop>lin_altro</tabstop>
<tabstop>btn_avanzate</tabstop>
<tabstop>btn_avanti</tabstop>
<tabstop>btn_indietro</tabstop>
</tabstops>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
<buttongroups>
<buttongroup name="btngrp_divisore"/>
</buttongroups>
</ui>
+33
View File
@@ -0,0 +1,33 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['guimain.py'],
pathex=['./libbananasplit', './UserInterface/CompiledUI', 'D:\\Emanuele\\Documenti\\workspace\\bananaSPLIT\\bananaSPLIT'],
binaries=[],
datas=[('C:\\Users\\Emanuele Trabattoni\\AppData\\Roaming\\Python\\Python37\\site-packages\\text_unidecode\\data.bin', '.\\text_unidecode')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='bananaSPLIT.exe',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True , icon='bananasplit.ico')
+33
View File
@@ -0,0 +1,33 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['guimain.py'],
pathex=['./libbananasplit', './UserInterface/compiledUI', '/home/emanuele/Documents/LocalEclipseWorkspace/bananaSPLIT/bananaSPLIT'],
binaries=[],
datas=[('/home/emanuele/.local/lib/python3.6/site-packages/text_unidecode/data.bin', './text_unidecode')],
hiddenimports=['mainwindow'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='bananaSPLIT.linux',
debug=False,
bootloader_ignore_signals=False,
strip=True,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True , icon='UserInterface/icons8-banana-split-80.png')
-64
View File
@@ -1,64 +0,0 @@
{
"INworkPath": "D:\\Test\\",
"OUTworkPath": "D:\\Test\\Separati\\",
"OUTnameFormat":"TEST_{docnum}_{year:04d}{month:02d}{day:02d}_{title}.txt",
"docStruct": {
"docSep": "\\s*Copyright [(0-9)]+",
"dateFormat":"{month} {day:d}, {year:d}{}",
"dateWords": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID" ,
"NOTES",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
},
"settings": {
"encoding": "utf-8",
"monthPosition": 0,
"getNewsPaperName": true,
"nameNotFoundStr" : "--ND--",
"includeTitle" : true,
"removeDuplicates": true,
"showSkipped": false,
"showRemovedDuplicates": true,
"maxTitleLen": 32,
"loadTXT": true,
"loadDOCX": false,
"removeOldFiles":true,
"saveSeparateFiles": true,
"saveBodyFile": true,
"saveBodyNumber":true,
"delLF": false,
"delWordBreak": true,
"delChars": "'|@|#"
}
}
-62
View File
@@ -1,62 +0,0 @@
{
"INworkPath": "C:\\Test\\",
"OUTworkPath": "C:\\Test\\Separati\\",
"OUTnameFormat":"TEST_{docnum}_{year:04d}{month:02d}{day:02d}_{papername}_{title}.txt",
"docStruct": {
"docSep": "Copyright [(0-9)]+",
"dateFormat":"{day:d} {month} {year:d} {}",
"dateWords": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:"
]
},
"settings":
"settings": {
"encoding": "utf-8",
"monthPosition": 0,
"getNewsPaperName": true,
"nameNotFoundStr" : "--ND--",
"includeTitle" : true,
"removeDuplicates": true,
"showSkipped": false,
"showRemovedDuplicates": true,
"maxTitleLen": 32,
"loadTXT": true,
"loadDOCX": false,
"removeOldFiles":true,
"saveSeparateFiles": true,
"saveBodyFile": true,
"saveBodyNumber":true,
"delLF": false,
"delWordBreak": true,
"delChars": "'|@|#"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.3",
"paths": {
"lastUsed": "defaults.json",
"configurationPath": "./conf/",
"INworkPath": "C://",
"OUTworkPath": "C://",
"fileList": []
},
"docStruct": {
"fileVersNew": false,
"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": {
"winW": 800,
"winH": 700,
"encoding": "windows-1252",
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+76
View File
@@ -0,0 +1,76 @@
{
"Italiano": {
"dateWords": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
},
"English": {
"dateWords": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"headWords": [
"BYLINE:",
"SECTION:",
"LENGTH:",
"DATELINE:",
"HIGHLIGHT:",
"Email:"
],
"tailWords": [
"Newstex ID:",
"NOTES:",
"LANGUAGE:",
"GRAPHIC:",
"TYPE:",
"URL:",
"LOAD-DATE:",
"PUBLICATION-TYPE:",
"DOCUMENT-TYPE:",
"CHARTS:",
"JOURNAL-CODE:"
]
}
}
+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.3",
"paths": {
"lastUsed": "linux.json",
"configurationPath": "./conf/",
"INworkPath": "/home/",
"OUTworkPath": "/home/",
"fileList": []
},
"docStruct": {
"fileVersNew": false,
"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": {
"winW": 800,
"winH": 700,
"encoding": "windows-1252",
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"logFile": "D:\\Test\\bananaSPLIT.log",
"logFormat": "%(asctime)s|%(levelname)-8s| %(message)-50s",
"logTimeFormat": "%m-%d %H:%M:%S"
}
+67
View File
@@ -0,0 +1,67 @@
{
"version": "v1.3",
"paths": {
"lastUsed": "spiripacchio.json",
"configurationPath": "./conf/",
"INworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles/FileBastardi",
"OUTworkPath": "H:/",
"fileList": []
},
"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": {
"winW": 800,
"winH": 700,
"encoding": "windows-1252",
"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": [
"'",
"@",
"#",
"$",
"%",
"^",
"&"
]
}
}
+21
View File
@@ -0,0 +1,21 @@
'''
Created on 30 mar 2020
@author: Emanuele Trabattoni
'''
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
+566
View File
@@ -0,0 +1,566 @@
'''
Created on 2 nov 2019
@author: Emanuele Trabattoni
TODO LIST
'''
import sys, copy, json
import PyQt5.QtWidgets
import PyQt5.QtGui
from mainwindow import Ui_mainwin
from selezout import Ui_selezout
from titolow import Ui_titolo
from avanzatetitolo3 import Ui_advtitolo3 as Ui_advtitolo
from advopt import Ui_editconf
from libfancylogger import fancyLogger
from libconfload import bananaCONF
from libsplit import bananaSPLITTER
from PyQt5.QtCore import QDir, QSize, pyqtSlot, pyqtSignal
from PyQt5.QtWidgets import QMessageBox, QSizePolicy
class bananaMain(PyQt5.QtWidgets.QMainWindow):
def __init__(self):
PyQt5.QtWidgets.QMainWindow.__init__(self)
try:
self.logger = fancyLogger(filepath=r"./conf/loggerconf.json",fileLog=False)
self.conf = bananaCONF(workdir=r"./conf", logger=self.logger)
self.conf.open()
self.conf.use("defaults.json")
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
except Exception as e:
print(e)
sys.exit()
# inizializzazione interfaccia
self.ui = Ui_mainwin()
self.ui.setupUi(self)
self.titolo = bananaTitolo(self.conf, self.logger)
self.titoloav = bananaTitoloAvanzate(self.conf, self.logger)
self.selezout = bananaSelezOut(self.conf, self.logger)
self.advopt = bananaAdvOpt(self.conf, self.logger)
#popola le tab con le finestre giuste
self.ui.wgt_main.addTab(self.titolo, "Impostazioni Titolo")
self.ui.wgt_main.addTab(self.selezout, "Selezione Output")
# connetti bottoni avanti
self.ui.btn_avanti.clicked.connect(self.nextTab)
self.titolo.titoloui.btn_avanti.clicked.connect(self.nextTab)
#self.selezout.selezoutui.btn_avanti.clicked.connect(self.nextTab)
#connetti bottoni indietro
self.titolo.titoloui.btn_indietro.clicked.connect(self.prevTab)
self.selezout.selezoutui.btn_indietro.clicked.connect(self.prevTab)
#connetti bottoni selezione cartelle
self.ui.btn_cartellasorg.clicked.connect(self.selezSorg)
self.ui.btn_cartelladest.clicked.connect(self.selezDest)
#connetti action tab
self.ui.actionLingua.triggered.connect(self.openLanguage)
self.ui.actionAvanzate.triggered.connect(self.openAdvOpt)
self.ui.actionCarica_Preset.triggered.connect(self.openLoadPreset)
self.ui.actionSalva_Preset.triggered.connect(self.openSavePreset)
#connetti segnali delle sottointerfacce
self.advopt.update.connect(self.fillAllInterfaces)
self.logger.sendLog.connect(self.appendLog)
#riempi pagine di interfaccia
self.fillAllInterfaces()
self.setSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed)
self.setFixedSize(QSize(self.conf.getParam('settings','winW'), self.conf.getParam('settings','winH')))
pass
def fillInterface(self):
#pagina principale
try:
self.ui.lbl_preset.setText(self.conf.inUse.replace(".json",""))
self.ui.lbl_sorg.setText(self.conf.getParam('paths','INworkPath'))
self.ui.lbl_dest.setText(self.conf.getParam('paths','OUTworkPath'))
self.ui.rad_fileNew.setChecked(self.conf.getParam('docStruct', 'fileVersNew'))
self.ui.rad_fileOld.setChecked(not self.conf.getParam('docStruct', 'fileVersNew'))
self.fillFileList()
except:
self.log.critical("MainWindow: Configurazione non accettata")
def fillAllInterfaces(self):
self.fillInterface()
self.titolo.fillInterface()
self.titoloav.fillInterface()
self.selezout.fillInterface()
self.advopt.fillInterface()
def fillFileList(self):
fl = QDir(self.conf.getParam('paths','INworkPath'))
fl.setNameFilters(['*.txt','*.TXT'])
fl = fl.entryList(QDir.NoDotAndDotDot | QDir.Files)
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):
self.ui.wgt_main.setCurrentIndex(self.ui.wgt_main.currentIndex()+1)
self.logger.debug("Prossima Tab")
print(self.geometry().width(), self.geometry().height())
pass
def prevTab(self):
self.ui.wgt_main.setCurrentIndex(self.ui.wgt_main.currentIndex()-1)
self.logger.debug("Tab Precedente")
pass
def openLoadPreset(self):
self.logger.debug("Apri Carica Preset")
lf = PyQt5.QtWidgets.QFileDialog(self,"Carica Preset",self.conf.getParam('paths', 'configurationPath'))
lf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptOpen)
lf.setFileMode(PyQt5.QtWidgets.QFileDialog.ExistingFile)
lf.setNameFilter("bananaCONF (*.json)")
if lf.exec():
cf = str(lf.selectedFiles()[0].split('/')[-1])
self.logger.info("Apro la configurazione: {}".format(cf))
self.conf.open()
self.conf.use(cf)
self.logger.debug("Riempio tutte le tab")
self.fillAllInterfaces()
pass
def openSavePreset(self):
self.logger.debug("Apri Salva Preset")
self.logger.debug("Forzo applica a tutte le tab")
self.applicaTutto()
sf = PyQt5.QtWidgets.QFileDialog(self,"Salva Preset",self.conf.getParam('paths', 'configurationPath'))
sf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptSave)
sf.setNameFilter("bananaCONF (*.json)")
if sf.exec():
rv=str(sf.selectedFiles()[0].split('/')[-1])
self.conf.setParam(('paths','lastUsed'),rv)
#scrivi quale file e' stato usato per ultimo nel default
prev=self.conf.inUse
self.conf.use("defaults.json")
self.conf.setParam(('paths','lastUsed'),rv)
self.conf.save(fName="defaults.json")
self.conf.use(prev)
##
self.logger.debug("Scrivo la configurazione: {}".format(rv))
self.conf.save(fName=rv)
pass
def openAdvOpt(self):
self.logger.debug("Apri Opzioni Avanzate")
self.advopt.fillInterface()
self.advopt.show()
pass
def openLanguage(self):
self.logger.debug("Apri Opzioni Lingua")
pass
def selezSorg(self):
rv = PyQt5.QtWidgets.QFileDialog.getExistingDirectory(self,"Seleziona Cartella Sorgente",self.conf.getParam('paths','INworkPath'))
if rv is not "":
self.conf.setParam(keys=('paths','INworkPath',), val=rv+"/")
self.ui.lbl_sorg.setText(rv)
self.logger.info("Selezionata Cartella Sorgente: {}".format(rv+"/"))
self.fillFileList()
pass
def selezDest(self):
rv = PyQt5.QtWidgets.QFileDialog.getExistingDirectory(self,"Seleziona Cartella Destinazione",self.conf.getParam('paths','OUTworkPath'))
if rv is not "":
self.conf.setParam(keys=('paths','OUTworkPath',), val=rv+"/")
self.ui.lbl_dest.setText(rv)
self.logger.info("Selezionata Cartella Destinazione: {}".format(rv+"/"))
pass
def openFileDialog(self, name, path):
self.log.debug("Apro in directory: {}".format(path))
return
def applicaTutto(self):
self.conf.setParam(('docStruct','fileVersNew'), self.ui.rad_fileNew.isChecked())
self.titolo.applica()
self.selezout.applica()
def appendLog(self, msg):
self.ui.txt_log.append(msg)
#############################################################
####################### INTERFACES ##########################
#############################################################
class bananaTitolo(PyQt5.QtWidgets.QWidget):
def __init__(self, confloader=None, logger=None):
PyQt5.QtWidgets.QWidget.__init__(self)
self.titoloui = Ui_titolo()
self.titoloui.setupUi(self)
self.conf = confloader
self.log = logger
if self.conf is not None:
self.titoloui.btn_avanzate.clicked.connect(self.spawnAvanzate)
self.titoloui.btn_avanti.clicked.connect(self.applica)
self.advtitolo = bananaTitoloAvanzate(confloader, self.log)
self.fillInterface()
pass
def fillInterface(self):
try:
# imposta predefiniti interfaccia da file
#Data (la piu complicata)
self.titoloui.chk_data.setChecked(self.conf.getParam('docStruct','outDate'))
self.titoloui.rad_datajpn.setChecked(self.conf.getParam('docStruct', 'outDateType') is 'jpn')
self.titoloui.rad_dataita.setChecked(self.conf.getParam('docStruct', 'outDateType') is 'it')
self.titoloui.rad_datausa.setChecked(self.conf.getParam('docStruct', 'outDateType') is 'usa')
#Titolo
self.titoloui.chk_titolo.setChecked(self.conf.getParam('docStruct','outTitle'))
self.titoloui.spn_ncarat.setValue(self.conf.getParam('docStruct', 'maxTitleLen'))
#Numero Documento
self.titoloui.chk_docnum.setChecked(self.conf.getParam('docStruct','outNumber'))
#Separatore
found=False
for itmn in range(self.titoloui.lyt_sep.count()):
itm=self.titoloui.lyt_sep.itemAt(itmn).widget()
if isinstance(itm, PyQt5.QtWidgets.QRadioButton):
if itm.text() == self.conf.getParam('docStruct', 'outNameSep'):
itm.setChecked(True)
found = True
if not found:
self.titoloui.rad_altro.setChecked(True)
self.titoloui.lin_altro.setText(self.conf.getParam('docStruct', 'customSep'))
#finestra avanzate
self.advtitolo.fillInterface()
except:
self.log.critical("Titolo: Configurazione non accettata")
def spawnAvanzate(self):
self.log.debug("Mostro la finestra avanzate titolo")
self.advtitolo.show()
pass
def applica(self):
self.log.info("Applico impostazioni Titolo")
self.conf.setParam(('docStruct','outDate'),self.titoloui.chk_data.isChecked())
self.conf.setParam(('docStruct','outNumber'),self.titoloui.chk_docnum.isChecked())
self.conf.setParam(('docStruct','outTitle'),self.titoloui.chk_titolo.isChecked())
if self.titoloui.rad_dataita.isChecked():
self.conf.setParam(('docStruct','outDateType'),'ita')
elif self.titoloui.rad_datajpn.isChecked():
self.conf.setParam(('docStruct','outDateType'),'jpn')
elif self.titoloui.rad_datausa.isChecked():
self.conf.setParam(('docStruct','outDateType'),'usa')
self.conf.setParam(('docStruct','maxTitleLen'), self.titoloui.spn_ncarat.value())
self.conf.setParam(('docStruct', 'customSep'),self.titoloui.lin_altro.text())
for itmn in range(self.titoloui.lyt_sep.count()):
itm=self.titoloui.lyt_sep.itemAt(itmn).widget()
if isinstance(itm, PyQt5.QtWidgets.QRadioButton):
if len(itm.text())==1 and itm.isChecked():
self.conf.setParam(('docStruct', 'outNameSep'), itm.text())
self.advtitolo.applica()
pass
class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
def __init__(self, confloader=None, logger=None):
PyQt5.QtWidgets.QWidget.__init__(self)
self.titoloavui = Ui_advtitolo()
self.titoloavui.setupUi(self)
self.titoloavui.btn_OK.clicked.connect(self.returnOk)
self.titoloavui.btn_annulla.clicked.connect(self.returnKo)
self.titoloavui.rad_dataprimo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_datasecondo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_dataterzo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_numeroprimo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_numerosecondo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_numeroterzo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_titoloprimo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_titolosecondo.clicked.connect(self.gestisciBottoni)
self.titoloavui.rad_titoloterzo.clicked.connect(self.gestisciBottoni)
self.conf = confloader
self.log = logger
self.fillInterface()
pass
def fillInterface(self):
try:
#rimepi interfaccia
self.titoloavui.rad_dataprimo.setChecked(self.conf.getParam('docStruct','datePos')==1)
self.titoloavui.rad_datasecondo.setChecked(self.conf.getParam('docStruct','datePos')==2)
self.titoloavui.rad_dataterzo.setChecked(self.conf.getParam('docStruct','datePos')==3)
self.titoloavui.rad_titoloprimo.setChecked(self.conf.getParam('docStruct','titlePos')==1)
self.titoloavui.rad_titolosecondo.setChecked(self.conf.getParam('docStruct','titlePos')==2)
self.titoloavui.rad_titoloterzo.setChecked(self.conf.getParam('docStruct','titlePos')==3)
self.titoloavui.rad_numeroprimo.setChecked(self.conf.getParam('docStruct','numberPos')==1)
self.titoloavui.rad_numerosecondo.setChecked(self.conf.getParam('docStruct','numberPos')==2)
self.titoloavui.rad_numeroterzo.setChecked(self.conf.getParam('docStruct','numberPos')==3)
self.titoloavui.txt_prefisso.setText(self.conf.getParam('docStruct','outPrefix'))
self.titoloavui.txt_suffisso.setText(self.conf.getParam('docStruct','outSuffix'))
except:
self.log.critical("AvanzateTitolo: Configurazione non accettata")
def gestisciBottoni(self):
#PRIMO
if self.titoloavui.rad_numeroprimo.isChecked():
self.titoloavui.rad_dataprimo.setChecked(False)
self.titoloavui.rad_titoloprimo.setChecked(False)
self.titoloavui.rad_numerosecondo.setChecked(False)
self.titoloavui.rad_numeroterzo.setChecked(False)
if self.titoloavui.rad_dataprimo.isChecked():
self.titoloavui.rad_numeroprimo.setChecked(False)
self.titoloavui.rad_titoloprimo.setChecked(False)
self.titoloavui.rad_datasecondo.setChecked(False)
self.titoloavui.rad_dataterzo.setChecked(False)
if self.titoloavui.rad_titoloprimo.isChecked():
self.titoloavui.rad_numeroprimo.setChecked(False)
self.titoloavui.rad_dataprimo.setChecked(False)
self.titoloavui.rad_titolosecondo.setChecked(False)
self.titoloavui.rad_titoloterzo.setChecked(False)
#secondo
if self.titoloavui.rad_numerosecondo.isChecked():
self.titoloavui.rad_datasecondo.setChecked(False)
self.titoloavui.rad_titolosecondo.setChecked(False)
self.titoloavui.rad_numeroprimo.setChecked(False)
self.titoloavui.rad_numeroterzo.setChecked(False)
if self.titoloavui.rad_datasecondo.isChecked():
self.titoloavui.rad_numerosecondo.setChecked(False)
self.titoloavui.rad_titolosecondo.setChecked(False)
self.titoloavui.rad_dataprimo.setChecked(False)
self.titoloavui.rad_dataterzo.setChecked(False)
if self.titoloavui.rad_titolosecondo.isChecked():
self.titoloavui.rad_numerosecondo.setChecked(False)
self.titoloavui.rad_datasecondo.setChecked(False)
self.titoloavui.rad_titoloprimo.setChecked(False)
self.titoloavui.rad_titoloterzo.setChecked(False)
#terzo
if self.titoloavui.rad_numeroterzo.isChecked():
self.titoloavui.rad_dataterzo.setChecked(False)
self.titoloavui.rad_titoloterzo.setChecked(False)
self.titoloavui.rad_numeroprimo.setChecked(False)
self.titoloavui.rad_numerosecondo.setChecked(False)
if self.titoloavui.rad_dataterzo.isChecked():
self.titoloavui.rad_numeroterzo.setChecked(False)
self.titoloavui.rad_titoloterzo.setChecked(False)
self.titoloavui.rad_dataprimo.setChecked(False)
self.titoloavui.rad_datasecondo.setChecked(False)
if self.titoloavui.rad_titoloterzo.isChecked():
self.titoloavui.rad_numeroterzo.setChecked(False)
self.titoloavui.rad_dataterzo.setChecked(False)
self.titoloavui.rad_titoloprimo.setChecked(False)
self.titoloavui.rad_titolosecondo.setChecked(False)
pass
def returnOk(self):
self.log.info("Avanzate Titolo Accettate")
self.applica()
self.hide()
pass
def returnKo(self):
self.log.info("Avanzate Titolo Rifiutate")
self.hide()
pass
def applica(self):
#data
if self.titoloavui.rad_dataprimo.isChecked():
self.conf.setParam(('docStruct', 'datePos'), 1)
elif self.titoloavui.rad_datasecondo.isChecked():
self.conf.setParam(('docStruct', 'datePos'), 2)
elif self.titoloavui.rad_dataterzo.isChecked():
self.conf.setParam(('docStruct', 'datePos'), 3)
else:
self.conf.setParam(('docStruct', 'datePos'), -1)
#numero
if self.titoloavui.rad_numeroprimo.isChecked():
self.conf.setParam(('docStruct', 'numberPos'), 1)
elif self.titoloavui.rad_numerosecondo.isChecked():
self.conf.setParam(('docStruct', 'numberPos'), 2)
elif self.titoloavui.rad_numeroterzo.isChecked():
self.conf.setParam(('docStruct', 'numberPos'), 3)
else:
self.conf.setParam(('docStruct', 'numberPos'), -1)
#titolo
if self.titoloavui.rad_titoloprimo.isChecked():
self.conf.setParam(('docStruct', 'titlePos'), 1)
elif self.titoloavui.rad_titolosecondo.isChecked():
self.conf.setParam(('docStruct', 'titlePos'), 2)
elif self.titoloavui.rad_titoloterzo.isChecked():
self.conf.setParam(('docStruct', 'titlePos'), 3)
else:
self.conf.setParam(('docStruct', 'titlePos'), -1)
#prefisso e suffisso
self.conf.setParam(('docStruct','outPrefix'), self.titoloavui.txt_prefisso.text())
self.conf.setParam(('docStruct','outSuffix'), self.titoloavui.txt_suffisso.text())
class bananaSelezOut(PyQt5.QtWidgets.QWidget):
def __init__(self, confloader=None, logger=None):
PyQt5.QtWidgets.QWidget.__init__(self)
self.selezoutui = Ui_selezout()
self.selezoutui.setupUi(self)
self.conf = confloader
self.log = logger
if self.conf is not None:
self.selezoutui.btn_split.clicked.connect(self.applica)
self.selezoutui.btn_split.clicked.connect(self.splitta)
self.fillInterface()
pass
def fillInterface(self):
try:
self.selezoutui.cmb_lingua.clear()
self.selezoutui.cmb_lingua.addItems(self.conf.settingsList['languageconf.json'].keys())
self.selezoutui.cmb_lingua.setCurrentIndex(self.conf.getParam('docStruct','languageIdx'))
self.selezoutui.rad_mainbodyEFile.setChecked(self.conf.getParam('settings', 'saveBodyFile') and self.conf.getParam('settings', 'saveSeparateFiles'))
self.selezoutui.rad_file.setChecked(self.conf.getParam('settings', 'saveSeparateFiles') and not self.conf.getParam('settings', 'saveBodyFile'))
self.selezoutui.rad_mainbody.setChecked(self.conf.getParam('settings', 'saveBodyFile') and not self.conf.getParam('settings', 'saveSeparateFiles'))
self.selezoutui.chk_removeDuplicates.setChecked(self.conf.getParam('settings', 'removeDuplicates'))
self.selezoutui.chk_includeTitle.setChecked(self.conf.getParam('settings', 'includeTitle'))
self.selezoutui.chk_removeBreakWord.setChecked(self.conf.getParam('settings', 'delWordBreak'))
self.selezoutui.chk_cleaDestFolder.setChecked(self.conf.getParam('settings', 'removeOldFiles'))
self.selezoutui.lin_specialChars.setText(''.join(self.conf.getParam('settings', 'delChars')))
pass
except:
self.log.critical("SelezUscita: Configurazione non accettata")
pass
def applica(self):
self.log.info("Applico Impostazioni File Uscita")
self.conf.setParam(('docStruct', 'language'), self.selezoutui.cmb_lingua.currentText())
self.conf.setParam(('docStruct', 'languageIdx'), self.selezoutui.cmb_lingua.currentIndex())
self.conf.setParam(('settings', 'saveBodyFile'), self.selezoutui.rad_mainbody.isChecked()
| self.selezoutui.rad_mainbodyEFile.isChecked())
self.conf.setParam(('settings', 'saveSeparateFiles'), self.selezoutui.rad_file.isChecked()
| self.selezoutui.rad_mainbodyEFile.isChecked())
self.conf.setParam(('settings', 'removeDuplicates'), self.selezoutui.chk_removeDuplicates.isChecked())
self.conf.setParam(('settings', 'includeTitle'), self.selezoutui.chk_removeDuplicates.isChecked())
self.conf.setParam(('settings', 'delWordBreak'), self.selezoutui.chk_removeBreakWord.isChecked())
self.conf.setParam(('settings', 'removeOldFiles'), self.selezoutui.chk_cleaDestFolder.isChecked())
self.conf.setParam(('settings', 'delChars'), list(self.selezoutui.lin_specialChars.text()))
pass
def splitta(self):
# costruisco il dizionario di configurazione
prefile = self.conf.inUse
splconf = copy.deepcopy(self.conf.dump())
lang = copy.deepcopy(self.conf.use('languageconf.json').getParam(splconf['docStruct']['language']))
splconf['docStruct']['language'] = lang
self.conf.use(prefile)
#formato nome in uscita
nametemp=[]
for i in range(1,4):
if i == splconf['docStruct']['numberPos'] and splconf['docStruct']['outNumber']:
nametemp.append("{docnum}")
if i == splconf['docStruct']['datePos'] and splconf['docStruct']['outDate']:
nametemp.append(splconf['docStruct']['dateFormats'][splconf['docStruct']['outDateType']])
if i == splconf['docStruct']['titlePos'] and splconf['docStruct']['outTitle']:
nametemp.append("{title}")
pass
if splconf['docStruct']['outPrefix'] != '':
nametemp.insert(0, splconf['docStruct']['outPrefix']) #inserisco prefisso e suffisso
if splconf['docStruct']['outSuffix'] != '':
nametemp.append(splconf['docStruct']['outSuffix'])
#unisco i pezzi
splconf['docStruct']['outNameFormat'] = splconf['docStruct']['outNameSep'].join(nametemp)+splconf['docStruct']['outExt']
#costruisco messageBox
msgb = QMessageBox(parent=self, icon=QMessageBox.Warning, text="Sto SPLITTANDO, attendi..")
msgb.setWindowTitle("Sto Splittando..")
msgb.show()
@pyqtSlot()
def updateState(msg):
msgb.setText(msg)
# costruisco i thread
tDict={}
try:
for f in splconf['paths']['fileList']:
splconf['name']=f
tDict[f] = bananaSPLITTER(fileParams=copy.deepcopy(splconf), logger=self.log)
tDict[f].sendStatus.connect(updateState)
tDict[f].run()
#QThreadPool.globalInstance().start(tDict[f])
except Exception as e:
self.log.error(f"Impossibile avviare lo splitter: {e}")
msgb.setText('FINITO!')
pass
class bananaAdvOpt(PyQt5.QtWidgets.QWidget):
update = pyqtSignal()
def __init__(self, confloader=None, logger=None):
PyQt5.QtWidgets.QWidget.__init__(self)
self.advoptui = Ui_editconf()
self.advoptui.setupUi(self)
self.conf = confloader
self.log = logger
self.errmsg=None
if self.conf is not None:
self.advoptui.btn_ok.clicked.connect(self.accetta)
self.advoptui.btn_cancel.clicked.connect(self.rifiuta)
self.fillInterface()
pass
def fillInterface(self):
try:
self.advoptui.txt_confFile.setPlainText(json.dumps(self.conf.dump(),indent=2))
except:
self.log.critical("AdvancedOptions: Configurazione non accettata")
pass
def accetta(self):
self.errmsg = QMessageBox()
self.errmsg.setModal(True)
self.errmsg.setWindowTitle("Avanzate Globali")
icon = PyQt5.QtGui.QIcon()
icon.addPixmap(PyQt5.QtGui.QPixmap(":/icons/icons8-smartphone-ram-100.png"), PyQt5.QtGui.QIcon.Normal, PyQt5.QtGui.QIcon.Off)
self.errmsg.setWindowIcon(icon)
try:
self.conf.loads(self.advoptui.txt_confFile.toPlainText())
self.log.info("Parametri inseriti validi, configurazione accettata")
self.errmsg.setIcon(QMessageBox.Information)
self.errmsg.setText("Parametri inseriti validi, configurazione accettata")
self.errmsg.show()
self.update.emit()
self.hide()
except Exception as e:
self.log.error(f"Errore nei parametri! {e}")
self.errmsg.setIcon(QMessageBox.Critical)
self.errmsg.setText(f"Errore nei parametri!\n{e}")
self.errmsg.show()
pass
def rifiuta(self):
self.log.info(f"AdvancedOptions: Configurazione Rifiutata")
self.hide()
pass
class bananaSplitterInterface(PyQt5.QtWidgets.QWidget):
def __init__(self, confloader=None, logger=None):
PyQt5.QtWidgets.QWidget.__init__(self)
pass
#############################################################
####################### MAIN ################################
#############################################################
def except_hook(cls, exception, traceback):
sys.__excepthook__(cls, exception, traceback)
if __name__ == '__main__':
app = PyQt5.QtWidgets.QApplication(sys.argv)
sys.excepthook = except_hook
window = bananaMain()
window.resize(window.sizeHint().width(), window.size().height())
window.show()
rv = app.exec()
print("ExitCode: {}".format(rv))
sys.exit(rv)
pass
+108
View File
@@ -0,0 +1,108 @@
'''
Created on 2 nov 2019
@author: Emanuele Trabattoni
'''
import json,os,glob,copy
class bananaCONF(object):
'''
Carica e Salva file di configurazione per bananaSPLITTER
'''
def __init__(self, workdir=None, logger=None):
self.log = logger
self.fileList = None
self.workdir = None
self.inUse = None
self.settingsList = dict()
if workdir is not None:
self.workdir = workdir
os.chdir(workdir)
self.log.debug("Cerco le configurazioni in: [{}]".format(os.getcwd()))
else:
self.log.error("Non mi e' stata fornita una directory per i file di configurazione")
pass
def open(self):
self.log.info("Carico i file di configurazione")
self.fileList = glob.glob(r"*.json")
if len(self.fileList) > 0:
for f in self.fileList:
try:
fp = open(f)
tf = json.load(fp)
fName = f.split("\\")[-1]
self.settingsList[fName] = copy.deepcopy(tf)
self.log.info("Caricato correttamente: {}".format(fName))
fp.close()
except json.JSONDecodeError as e:
self.log.error("Impossibile leggere la configurazione:{}\n \
Controlla il file a riga: {} e colonna:{}" .format(e.doc, e.lineno, e.colno))
except IOError as ee:
self.log.error("Impossibile aprire il file: {}".format(ee))
except Exception as eee:
self.log.critical("Eccezione inaspettata: {}".format(eee))
else:
self.log.error("Non ho trovato alcun file di configurazione!")
pass
def reload(self):
self.settingsList = None
self.fileList = None
self.inUse = None
self.open()
pass
def use(self, toUse):
self.inUse = toUse
return self
def save(self, fName=None):
if fName is None:
fName=self.inUse
self.log.info("Salvo la configurazione: {}".format(fName))
try:
f=open(fName, 'w')
json.dump(self.settingsList[self.inUse], f, indent='\t')
f.close()
except IOError as e:
self.log.error("Impossibile salvare il file: {} - [{}]".format(fName,e))
except Exception as ei:
self.log.error("Errore imprevisto nella scrittura del file: {}".format(ei))
pass
def getFiles(self):
return self.fileList
def getParam(self, *keys):
rv = self.settingsList[self.inUse]
try:
for k in keys:
rv = rv[k]
return rv
except ValueError as ve:
self.log.error("Parametro di configurazione non valido! [{}]".format(ve))
return False
pass
def setParam(self, keys=(), val=None):
sv = self.settingsList[self.inUse]
try:
for k in keys[:-1]:
sv = sv[k]
sv[keys[-1]] = val
return True
except ValueError as ve:
self.log.error("Parametro di configurazione non valido! [{}]".format(ve))
return False
pass
def dump(self):
return self.settingsList[self.inUse]
def loads(self, conf):
jconf = json.loads(conf)
self.settingsList[self.inUse]=jconf
@@ -0,0 +1,99 @@
'''
Created on 2 nov 2019
@author: Emanuele Trabattoni
'''
import sys
import json
import logging
import colorama
from PyQt5.QtCore import QObject, pyqtSignal
class fancyLogger(QObject):
'''
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):
QObject.__init__(self)
try:
with open(filepath, 'r') as fp:
settings = json.load(fp)
fp.close()
colorama.init(convert=True)
self.LRED = colorama.Fore.LIGHTRED_EX
self.RED = colorama.Fore.RED
self.LYELLOW = colorama.Fore.LIGHTYELLOW_EX
self.YELLOW = colorama.Fore.YELLOW
self.LBLUE = colorama.Fore.LIGHTBLUE_EX
self.BLUE = colorama.Fore.BLUE
self.LGREEN = colorama.Fore.LIGHTGREEN_EX
self.LGREEN = colorama.Fore.GREEN
self.WHITE = colorama.Fore.LIGHTWHITE_EX
self.RST = colorama.Style.RESET_ALL
# Setup Logger
self.LOGGER = logging.getLogger(name)
self.LOGGER.setLevel(logging.DEBUG)
self.LOGGER.propagate = False
FORMATTER = logging.Formatter((settings["logFormat"]), (settings["logTimeFormat"]))
if fileLog:
# File Logging
fh = logging.FileHandler((settings["logFile"]))
fh.setLevel(logging.DEBUG)
fh.setFormatter(FORMATTER)
self.LOGGER.addHandler(fh)
if consoleLog:
# Console Logging
cl= logging.StreamHandler(sys.stdout)
cl.setLevel(logging.DEBUG)
cl.setFormatter(FORMATTER)
self.LOGGER.addHandler(cl)
except IOError as e:
print("Impossibile caricare la configurazione del logger: [{}]".format(e))
pass
def debug(self, msg="Undefined Debug"):
print(self.LBLUE, end='')
self.LOGGER.debug(msg)
print(self.RST, end='')
self.sendLog.emit(f"<FONT COLOR='#03c2fc'>DEBUG | {msg} </br>")
pass
def info(self, msg="Undefined Info"):
print(self.LGREEN, end='')
self.LOGGER.info(msg)
print(self.RST, end='')
self.sendLog.emit(f"<FONT COLOR='#6bfc03'>INFO | {msg} </br>")
pass
def warn(self, msg="Undefined Warning"):
print(self.LYELLOW, end='')
self.LOGGER.warning(msg)
print(self.RST, end='')
self.sendLog.emit(f"<FONT COLOR='#fc9403'>WARNING | {msg} </br>")
pass
def error(self, msg="Undefined Error"):
print(self.LRED, end='')
self.LOGGER.error(msg)
print(self.RST, end='')
self.sendLog.emit(f"<FONT COLOR='#ff0000'>ERROR | {msg} </br>")
pass
def critical(self, msg="Undefined Critical"):
print(self.RED, end='')
self.LOGGER.critical(msg)
print(self.RST, end='')
self.sendLog.emit(f"<FONT COLOR='#fc03ce'>CRITICAL | {msg} </br>")
pass
def testColors(self):
self.debug("Test Debug")
self.info("Test Info")
self.warn("Test Warning")
self.error("Test Error")
self.critical("Test Critical")
pass
+403
View File
@@ -0,0 +1,403 @@
'''
Created on 2 nov 2019
@author: Emanuele Trabattoni
'''
from PyQt5.QtCore import QObject, pyqtSignal
from slugify import slugify
import time, parse, re, copy, os, json
import traceback
class bananaSPLITTER(QObject):
sendStatus = pyqtSignal(str)
def __init__(self, fileParams=None, logger=None):
QObject.__init__(self)
self.fileParams = fileParams
self.log = logger
self.rawFile = None
self.status = "first"
self.contentList = list()
self.bodyCounter=0
self.duplicateNumber=0
#self.log.debug(f"Configurazione: \n {json.dumps(fileParams, indent=2)}")
if fileParams is not None:
self.log.debug("Sto operando sul file: {}..".format(self.fileParams['name']))
self.paths = self.fileParams['paths']
self.docStruct = self.fileParams['docStruct']
self.settings = self.fileParams['settings']
self.fileName = self.fileParams['name']
self.outPath = self.paths['OUTworkPath']+slugify(self.fileName)+'/'
self.beginTime = time.time()
pass
else:
self.log.critical("Non e' stato fornito il nome di alcun file da splittare!")
pass
def run(self):
self.log.info("Nuovo SPLITTER su file: {}".format(self.fileName))
self.sendStatus.emit(f"Inizio {self.fileName}")
try:
self.openFile()
self.remEmptyLines()
if self.docStruct['fileVersNew']:
self.newSplitFile()
else:
self.splitFile()
if self.settings['removeDuplicates']:
self.log.info("Controllo se ci sono dei duplicati..")
self.removeDuplicates()
else:
for idx, ff in enumerate(self.contentList):
ff['duplicate']=False
self.contentList[idx]=ff
self.log.warn('Salto il controllo dei duplicati..')
# se il parse e la rimozione dei duplicati e' andata bene
# preparo e inizio il salvataggio
if os.path.exists(self.outPath):
if self.settings['removeOldFiles']:
#os.chdir(self.outPath)
for f in os.listdir(self.outPath):
os.remove(self.outPath+f)
else:
raise FileExistsError("Non posso sovrascrivere i vecchi file, eliminali manualmente!")
else:
os.mkdir(self.outPath)
#os.chdir(self.outPath)
if self.settings['saveSeparateFiles']:
self.saveSeparate()
if self.settings['saveBodyFile']:
self.saveBody()
self.log.info("L'elaborazione del file ha richiesto {:4.2f} sec".format(time.time()-self.beginTime))
except UnicodeDecodeError as ee:
self.log.critical("Il file [{}] contiene caratteri non compatibili con la codifica scelta! [{}]"
.format(self.fileParams['name'],ee))
except FileExistsError as fe:
self.log.critical(fe)
except Exception as ee:
traceback.print_exc()
self.log.warn(ee)
pass
def openFile(self):
try:
#os.chdir(self.paths["INworkPath"])
self.log.info("Carico il contenuto..")
fp = open(self.paths["INworkPath"]+'/'+self.fileParams['name'], mode='r', encoding=self.settings['encoding'])
self.rawFile = fp.readlines()
fp.close()
except IOError as e:
self.log.critical("Impossibile aprire il file: {}! [{}]".format(self.fileName,e))
raise BaseException("OpenFile")
os.rmdir(self.outPath)
except Exception as ee:
print(ee)
pass
def remEmptyLines(self):
self.log.info("Elimino righe vuote e caratteri inutili..")
tempContent = []
try:
for ll in self.rawFile:
for c in self.settings['delChars']:
ll = ll.replace(c,'')
if ll not in ['\n', '\r', '\r\n']:
tempContent.append(ll)
self.rawFile = copy.deepcopy(tempContent)
self.rawFile.append('\n') #linea vuota finale per essere sicuri di parsare bene
return True
except:
self.log.error("Errore inaspettato durante l'eliminazione delle righe vuote!")
raise BaseException("DelLines")
del tempContent
def newSplitFile(self): #porting del codice dal programma originale
self.log.info("Individuo il contenuto..")
self.bodyCounter=0
self.duplicateNumber=0
docNumber = 0
docSkipped = 0
docDate = {}
title = ''
prevLine = ''
newsPaperName = ''
titleBegin = True
newsName = False
tempBody = list()
for l in self.rawFile: #per ogni linea del file
l=l.replace('\xa0', ' ')
lineWords = l.lstrip().split(' ') #dividi la riga in parole
if self.status == 'first':
try:
# ricerco la data
if (lineWords[self.settings['monthPosition']]).capitalize() in self.docStruct['language']['dateWords']:
try:
docDate=parse.parse(self.docStruct['dateFormat'],l).named
docDate['month']=docDate['month'].lstrip().rstrip().capitalize()
docDate['month']=self.docStruct['language']['dateWords'].index(docDate['month'])+1
# dopo la data inizia il titolo, ma prima si cerca il nome del giornale
except:
self.log.warn("Ho trovato una riga ambigua.. potrebbe essere una data ma non so: [{}]". format(l.strip('\r\n')))
pass
elif lineWords[0].upper() in self.docStruct['language']['headWords']:
#cambio stato e inizializzo un nuovo documento da riempire
self.status = 'head'
newDoc=dict()
newDoc['title']=title
newDoc['date']=docDate
newDoc['newsPaperName'] = newsPaperName
titleBegin = False
newsName = False
else:
if titleBegin:
title = l.strip().capitalize()
titleBegin = False
newsName = True
elif newsName:
if self.settings['getNewsPaperName']:
try:
if l.strip():
newsPaperName = l.strip()
else:
newsPaperName = self.settings['nameNotFoundStr']
except:
self.log.warn("E' successo qualcosa mentre stavo cercando il nome della pubblicazione,\
controlla i file di uscita! [{}]".format(l.strip()))
else:
newsPaperName = self.settings['nameNotFoundStr']
newsName = False
except IndexError:
self.log.error("Errore inaspettato, contatta il tuo sviluppatore di fiducia!")
pass
elif self.status == 'head':
tempContent = list()
#doppio check per trovare l'inizio del corpo documento
if re.match(self.docStruct['beginOfDocument'],l):
self.status='body'
#if lineWords[0].upper() not in self.docStruct['language']['headWords']: #se la prima parola non e' tra quelle di inizio
#tempBody.append(l) # vuol dire che ho trovato l'articolo e aggiungo la prima riga al contenuto del documento
#self.status = 'body'
elif self.status == 'body':
if re.match(self.docStruct['endOfDocument'],l) is not None: #controlla se ci sono articoli che non hanno le parole chiave finali
self.log.warn("Ho individuato una separatore valido prima che si chiusesse l'articolo precedente, controlla i tuoi file in uscita!\n\
L'errore dovrebbe essere intorno all'articolo {} ma non sono sicuro! \n\t\t\t[{}]".format(docNumber, l.strip()))
self.status = 'tail'
anomaly = True
elif not lineWords[0].upper() in self.docStruct['language']['tailWords']: #se la prima parola non e' tra quelle di fine
if self.settings['delLF']:
tempBody.append(l.strip('\n')) #allora sto leggendo l'articolo
else:
tempBody.append(l)
else:
self.status = 'tail'
anomaly = False
pass
elif self.status == 'tail':
if anomaly or (re.match(self.docStruct['endOfDocument'],l) is not None):
self.status = 'first'
anomaly = False
titleBegin = True
if self.settings['delWordBreak']:
tempContent=[ll.replace('-\n', '') for ll in tempContent]
newDoc['content']=copy.deepcopy(''.join(tempBody))
self.contentList.append(copy.deepcopy(newDoc))
tempBody=list()
self.bodyCounter +=1
pass
else:
self.log.critical("Stato Interno Sconosciuto")
prevLine=l #salva sempre e comunque il contenuto della linea precedente
pass
#ricerca terminata, espongo i risultati
self.log.info("Nel file ho trovato {0} articoli..".format(self.bodyCounter))
if docSkipped > 0:
self.log.warn("Attentione, LexisNexis ne ha saltati {} !!!".format(docSkipped))
pass
pass
def splitFile(self): #porting del codice dal programma originale
self.log.info("Individuo il contenuto..")
self.bodyCounter=0
self.duplicateNumber=0
docNumber = 0
docSkipped = 0
docDate = {}
title = ''
prevLine = ''
newsPaperName = ''
titleBegin = False
tempBody = list()
docSep=re.compile(self.docStruct['docSep'])
for l in self.rawFile: #per ogni linea del file
lineWords = l.lstrip().split(' ') #dividi la riga in parole
if self.status == 'first':
#prendo il numero di documento per vedere se ci sono buchi
try:
try:
nn = parse.parse("{current:d} Of {total} Documents",l.strip().capitalize()).named
if nn["current"]-docNumber==1:
pass
else:
if self.settings["showSkipped"]:
self.log.warn("Il conto dei documenti non torna! LexisNexis ne ha saltato qualcuno!\n Precedente:{0}-Attuale:{1}".format(docNumber,nn["current"]))
docSkipped+=1
docNumber = nn["current"]
except:
pass #non segnalare eccezione se il parse fallisce
# ricerco la data
if (lineWords[self.settings['monthPosition']]).capitalize() in self.docStruct['language']['dateWords']:
try:
docDate=parse.parse(self.docStruct['dateFormat'],l).named
docDate['month']=docDate['month'].lstrip().rstrip().capitalize()
docDate['month']=self.docStruct['language']['dateWords'].index(docDate['month'])+1
title = ''
titleBegin=True
# dopo la data inizia il titolo, ma prima si cerca il nome del giornale
if self.settings['getNewsPaperName']:
try:
if prevLine.split(' ')[0].strip().isalpha():
newsPaperName = prevLine.strip()
else:
newsPaperName = self.settings['nameNotFoundStr']
except:
self.log.warn("E' successo qualcosa mentre stavo cercando il nome della pubblicazione,\
controlla i file di uscita! [{}]".format(prevLine.strip()))
else:
newsPaperName = self.settings['nameNotFoundStr']
except:
self.log.warn("Ho trovato una riga ambigua.. potrebbe essere una data ma non so: [{}]". format(l.strip('\r\n')))
pass
elif lineWords[0] in self.docStruct['language']['headWords']:
#cambio stato e inizializzo un nuovo documento da riempire
self.status = 'head'
newDoc=dict()
newDoc['title']=title
newDoc['date']=docDate
newDoc['newsPaperName'] = newsPaperName
titleBegin=False
else:
if titleBegin:
title += l.strip().capitalize()
except IndexError:
self.log.error("Errore inaspettato, contatta il tuo sviluppatore di fiducia!")
pass
elif self.status == 'head':
tempContent = list()
if lineWords[0] not in self.docStruct['language']['headWords']: #se la prima parola non e' tra quelle di inizio
tempBody.append(l) # vuol dire che ho trovato l'articolo e aggiungo la prima riga al contenuto del documento
self.status = 'body'
pass
elif self.status == 'body':
if not lineWords[0] in self.docStruct['language']['tailWords']: #se la prima parola non e' tra quelle di fine
if self.settings['delLF']:
tempBody.append(l.strip('\n')) #allora sto leggendo l'articolo
else:
tempBody.append(l)
else:
self.status = 'tail'
anomaly = False
if docSep.match(l) is not None: #controlla se ci sono articoli che non hanno le parole chiave finali
self.log.warn("Ho individuato una separatore valido prima che si chiusesse l'articolo precedente, controlla i tuoi file in uscita!\n\
L'errore dovrebbe essere intorno all'articolo {} ma non sono sicuro! \n\t\t[{}]".format(docNumber, l.strip()))
self.status = 'tail'
anomaly = True
pass
elif self.status == 'tail':
if docSep.match(l) is not None or anomaly:
self.status = 'first'
anomaly = False
if self.settings['delWordBreak']:
tempContent=[ll.replace('-\n', '') for ll in tempContent]
newDoc['content']=copy.deepcopy(''.join(tempBody))
self.contentList.append(copy.deepcopy(newDoc))
tempBody=list()
self.bodyCounter +=1
pass
else:
self.log.critical("Stato Interno Sconosciuto")
prevLine=l #salva sempre e comunque il contenuto della linea precedente
pass
#ricerca terminata, espongo i risultati
self.log.info("Nel file ho trovato {0} articoli..".format(self.bodyCounter))
if docSkipped > 0:
self.log.warn("Attentione, LexisNexis ne ha saltati {} !!!".format(docSkipped))
pass
pass
def removeDuplicates(self):
titleList=[]
duplicateList=[]
for idx, ff in enumerate(self.contentList):
if ff['title'] not in titleList:
titleList.append(ff['title'])
ff['duplicate']=False
self.contentList[idx]=ff
pass
else:
if ff['title'] not in duplicateList:
duplicateList.append(ff['title'])
if self.settings['showRemovedDuplicates']:
self.log.info("Duplicato: {}".format(ff['title'].strip()))
ff['duplicate'] = True
self.contentList[idx]=ff
self.duplicateNumber+=1
self.log.info("Ho rimosso {} duplicati di {} articoli..". format(self.duplicateNumber, len(duplicateList)))
pass
def saveSeparate(self):
outFileCounter = 0
self.paths['OUTworkPath']=self.paths['OUTworkPath']+slugify(self.fileName)
self.log.info("Salvo gli articoli in file separati...")
self.log.debug("Persorso: {0}".format(self.outPath))
for ff in self.contentList:
try:
if ff['duplicate'] == False:
fName=self.docStruct['outNameFormat'].format(title=slugify(ff['title'][:self.docStruct['maxTitleLen']]),\
filename=slugify(self.fileName),\
docnum=outFileCounter,\
papername=ff['newsPaperName'].strip(),\
**ff['date'])
out=open(self.outPath+'{0}'.format(fName),'wb')
if self.settings['includeTitle']:
ff['content'] = ff['title']+os.linesep+ff['content']
out.write(ff['content'].encode(self.settings['encoding']))
out.close()
outFileCounter+=1
except IOError as e:
self.log.error("Qualcosa e\' andato storto, non riesco a scrivere il file: {}".format(e))
continue
except KeyError as ke:
self.log.error(f"Chiave {ke} non trovata per:{outFileCounter} {ff['title']} ")
except Exception as ee:
traceback.print_exc()
self.log.error(f"Errore generale nel salvataggio: {ee}")
if outFileCounter < self.bodyCounter:
self.log.error("Ho salvato meno file rispetto a quelli trovati!")
pass
def saveBody(self):
self.log.info('Salvo gli articoli in un singolo file vicino agli originali...')
self.log.debug('Persorso: {0}'.format(self.outPath))
#os.chdir(self.outPath)
try:
fName=slugify(self.fileName)
fName='BODYFILE_{0}.txt'.format(fName[:self.docStruct['maxTitleLen']])
fileContent = os.linesep.join([cc['content'] for cc in self.contentList])
out=open(self.outPath+'{0}'.format(fName),'wb')
out.write(fileContent.encode(self.settings['encoding']))
out.close()
except IOError as e:
self.log.error("Qualcosa e\' andato storto, non riesco a scrivere il file: {}".format(e))
except Exception as ee:
self.log.error(f"Errore generale nel salvataggio: {ee}")
pass
+21
View File
@@ -0,0 +1,21 @@
'''
Created on 1 dic 2019
@author: Emanuele Trabattoni
'''
import json
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.info("\n"+"="*50+"\n\tFINITO!!!\n"+"="*50)
+10 -8
View File
@@ -15,26 +15,24 @@ from pprint import pprint
from glob import glob
from copy import deepcopy
from slugify import slugify
####### VAR GLOBALI #######
####### FUNZIONI GLOBALI #######
def printTitle():
print(". . . , \n| | _ | _. _ ._ _ _ -+- _ * \n|/\|(/,|(_.(_)[ | )(/, | (_) *")
print(Fore.LIGHTYELLOW_EX,\
' _ ___________ _ _____ _____ \n\
print(Fore.LIGHTYELLOW_EX,' _ ___________ _ _____ _____ \n\
| | / ___| ___ \ | |_ _|_ _| \n\
| |__ __ _ _ __ __ _ _ __ __ _\ `--.| |_/ / | | | | | \n\
| \'_ \ / _` | \'_ \ / _` | \'_ \ / _` |`--. \ __/| | | | | | \n\
| |_) | (_| | | | | (_| | | | | (_| /\__/ / | | |_____| |_ | | \n\
|_.__/ \__,_|_| |_|\__,_|_| |_|\__,_\____/\_| \_____/\___/ \_/')
print ('\t\t\t\t\t\t\tVersione 0.4a\n\n', Style.RESET_ALL)
print ('\t\t\t\t\t\t\tVersione 0.4b\n\n', Style.RESET_ALL)
print('Iniziamo!!')
pass
#############################################################
####################### MAIN ################################
#############################################################
@@ -111,14 +109,18 @@ try:
else:
print('Non ho capito la risposta, sii un po\' piu\' specifico... [y/n]\n')
pass
except:
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a trovare nessun file da leggere :(', Style.RESET_ALL)
input()
sys.exit()
try:
if settings['removeOldFiles']:
print("Rimuovo i vecchi file dalla cartella di destinazione..")
for x in glob(cfg['OUTworkPath']+'*.txt'):
os.remove(x)
except:
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a trovare nessun file da leggere :(', Style.RESET_ALL)
input()
sys.exit()
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a rimuovere i vecchi file :(', Style.RESET_ALL)
lastTime=time.time()
fileCounter = 1
-5
View File
@@ -1,5 +0,0 @@
'''
Created on 27 nov 2018
@author: Emanuele
'''