21 Commits

Author SHA1 Message Date
9537530a34 Merge branch 'gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT.git into gui-devel 2019-10-30 21:49:48 +01:00
c401518db5 eliminato confGiulia 2019-10-30 21:49:32 +01:00
22413c3fb2 Main window aggiornata 2019-10-30 21:42:42 +01:00
bfbd0e8c79 ritorno alla normalità 2019-10-30 21:27:38 +01:00
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
56a509a5e6 Ricompilato versione 0.4b 2019-10-30 17:26:36 +01:00
84a38d0cb3 fixata indentazione titolo, aggiunti file conf alla cartella di dist 2019-10-30 17:10:16 +01:00
8ec7e5e835 spostata l'eliminazione dei vecchi file in un altro try 2019-10-30 16:59:05 +01:00
4f05729782 spostati i file di config nella dir del progetto 2019-10-30 16:55:30 +01:00
d7321a5041 riaggiornato gitignore 2019-10-30 15:52:44 +01:00
a29aa4da91 rimossa cartella build 2019-10-30 15:52:01 +01:00
170959e529 aggiornato gitignore 2019-10-30 15:50:23 +01:00
3fa74f6ed9 rebuild exe 2019-10-30 15:47:58 +01:00
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
4057b31203 Aggiornate Abbreviazioni 2019-10-27 19:33:43 +01:00
Giulia
0ddd8af3bc tolta icona 2019-10-27 19:22:40 +01:00
eec006f6c5 Primo commit branch interfaccia grafica 2019-10-27 19:04:18 +01:00
12 changed files with 324 additions and 26 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/.DS_Store /.DS_Store
/.project /.project
/.pydevproject /.pydevproject
bananaSPLIT/build

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -1,25 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<author></author> <class>win_main</class>
<comment></comment> <widget class="QMainWindow" name="win_main">
<exportmacro></exportmacro>
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>519</width>
<height>600</height> <height>391</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>MainWindow</string> <string>MainWindow</string>
</property> </property>
<widget class="QMenuBar" name="menubar" /> <widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="centralwidget" /> <widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>131</width>
<height>71</height>
</rect>
</property>
<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>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>150</x>
<y>110</y>
<width>34</width>
<height>71</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="btn_cartellasorg">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_cartelladest">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>491</width>
<height>16</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>180</y>
<width>421</width>
<height>80</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="chk_predefinita">
<property name="text">
<string>Rendi predefinite le cartelle</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_avanti">
<property name="minimumSize">
<size>
<width>79</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>79</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Avanti</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_opzioni">
<property name="geometry">
<rect>
<x>420</x>
<y>300</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Opzioni</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>519</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuBananaSplit">
<property name="title">
<string>BananaSplit</string>
</property>
</widget>
<addaction name="menuBananaSplit"/>
</widget>
<widget class="QStatusBar" name="statusbar"/> <widget class="QStatusBar" name="statusbar"/>
</widget> </widget>
<pixmapfunction></pixmapfunction> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@@ -0,0 +1,32 @@
# -*- mode: python -*-
block_cipher = None
a = Analysis(['main.py'],
pathex=['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,
runtime_tmpdir=None,
console=True , icon='banana.ico')

BIN
bananaSPLIT/dist/bananaSPLIT.exe vendored Normal file

Binary file not shown.

View File

@@ -38,7 +38,6 @@
"CHARTS:" "CHARTS:"
] ]
}, },
"settings":
"settings": { "settings": {
"encoding": "utf-8", "encoding": "utf-8",
"monthPosition": 0, "monthPosition": 0,

View File

@@ -15,26 +15,24 @@ from pprint import pprint
from glob import glob from glob import glob
from copy import deepcopy from copy import deepcopy
from slugify import slugify from slugify import slugify
####### VAR GLOBALI ####### ####### VAR GLOBALI #######
####### FUNZIONI GLOBALI ####### ####### FUNZIONI GLOBALI #######
def printTitle(): def printTitle():
print(". . . , \n| | _ | _. _ ._ _ _ -+- _ * \n|/\|(/,|(_.(_)[ | )(/, | (_) *") print(". . . , \n| | _ | _. _ ._ _ _ -+- _ * \n|/\|(/,|(_.(_)[ | )(/, | (_) *")
print(Fore.LIGHTYELLOW_EX,\ print(Fore.LIGHTYELLOW_EX,' _ ___________ _ _____ _____ \n\
' _ ___________ _ _____ _____ \n\
| | / ___| ___ \ | |_ _|_ _| \n\ | | / ___| ___ \ | |_ _|_ _| \n\
| |__ __ _ _ __ __ _ _ __ __ _\ `--.| |_/ / | | | | | \n\ | |__ __ _ _ __ __ _ _ __ __ _\ `--.| |_/ / | | | | | \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!!') print('Iniziamo!!')
pass pass
############################################################# #############################################################
####################### MAIN ################################ ####################### MAIN ################################
############################################################# #############################################################
@@ -111,14 +109,18 @@ try:
else: else:
print('Non ho capito la risposta, sii un po\' piu\' specifico... [y/n]\n') print('Non ho capito la risposta, sii un po\' piu\' specifico... [y/n]\n')
pass 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']: if settings['removeOldFiles']:
print("Rimuovo i vecchi file dalla cartella di destinazione..") print("Rimuovo i vecchi file dalla cartella di destinazione..")
for x in glob(cfg['OUTworkPath']+'*.txt'): for x in glob(cfg['OUTworkPath']+'*.txt'):
os.remove(x) os.remove(x)
except: except:
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a trovare nessun file da leggere :(', Style.RESET_ALL) print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a rimuovere i vecchi file :(', Style.RESET_ALL)
input()
sys.exit()
lastTime=time.time() lastTime=time.time()
fileCounter = 1 fileCounter = 1

64
bananaconfEN.json Normal file
View File

@@ -0,0 +1,64 @@
{
"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": "'|@|#"
}
}

61
bananaconfITA.json Normal file
View File

@@ -0,0 +1,61 @@
{
"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": {
"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": "'|@|#"
}
}