Compare commits
19 Commits
8bbaa144d8
...
v0.4b
| Author | SHA1 | Date | |
|---|---|---|---|
| 56a509a5e6 | |||
| 84a38d0cb3 | |||
| 8ec7e5e835 | |||
| 4f05729782 | |||
| d7321a5041 | |||
| a29aa4da91 | |||
| 170959e529 | |||
| 3fa74f6ed9 | |||
| 2f1236449a | |||
|
|
f43ed84d72 | ||
| 4057b31203 | |||
|
|
0ddd8af3bc | ||
| eec006f6c5 | |||
| 10f48a2303 | |||
|
|
4dd8673d86 | ||
| 1a9e9a7eac | |||
| 947c8e19ea | |||
| 3e6745fdeb | |||
| eebfefa0c3 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/.DS_Store
|
/.DS_Store
|
||||||
/.project
|
/.project
|
||||||
/.pydevproject
|
/.pydevproject
|
||||||
|
bananaSPLIT/build
|
||||||
BIN
WinBuild/dist/bananaSPLIT.exe
vendored
BIN
WinBuild/dist/bananaSPLIT.exe
vendored
Binary file not shown.
Binary file not shown.
BIN
bananaSPLIT/Manuali/abbreviazioni.png
Normal file
BIN
bananaSPLIT/Manuali/abbreviazioni.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
94
bananaSPLIT/UserInterface/mainwindow.ui
Normal file
94
bananaSPLIT/UserInterface/mainwindow.ui
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>win_main</class>
|
||||||
|
<widget class="QMainWindow" name="win_main">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>697</width>
|
||||||
|
<height>454</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<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="QPushButton" name="btn_cartellasorg">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<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>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_cartelladest">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>697</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
32
bananaSPLIT/bananaSPLIT.exe.spec
Normal file
32
bananaSPLIT/bananaSPLIT.exe.spec
Normal 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
BIN
bananaSPLIT/dist/bananaSPLIT.exe
vendored
Normal file
Binary file not shown.
@@ -37,8 +37,7 @@
|
|||||||
"DOCUMENT-TYPE:",
|
"DOCUMENT-TYPE:",
|
||||||
"CHARTS:"
|
"CHARTS:"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"settings":
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"encoding": "utf-8",
|
"encoding": "utf-8",
|
||||||
"monthPosition": 0,
|
"monthPosition": 0,
|
||||||
@@ -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
|
||||||
if settings['removeOldFiles']:
|
|
||||||
print("Rimuovo i vecchi file dalla cartella di destinazione..")
|
|
||||||
for x in glob(cfg['OUTworkPath']+'*.txt'):
|
|
||||||
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 trovare nessun file da leggere :(', Style.RESET_ALL)
|
||||||
input()
|
input()
|
||||||
sys.exit()
|
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 rimuovere i vecchi file :(', Style.RESET_ALL)
|
||||||
|
|
||||||
lastTime=time.time()
|
lastTime=time.time()
|
||||||
fileCounter = 1
|
fileCounter = 1
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
'''
|
|
||||||
Created on 27 nov 2018
|
|
||||||
|
|
||||||
@author: Emanuele
|
|
||||||
'''
|
|
||||||
64
bananaconfEN.json
Normal file
64
bananaconfEN.json
Normal 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
61
bananaconfITA.json
Normal 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": "'|@|#"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user