iniziano test librerie, modifiche file configurazione di test
This commit is contained in:
@@ -3,7 +3,6 @@ Created on 2 nov 2019
|
||||
|
||||
@author: Emanuele Trabattoni
|
||||
'''
|
||||
from libfancylogger import fancyLogger
|
||||
import json,os,glob,copy
|
||||
|
||||
class bananaCONF(object):
|
||||
@@ -80,9 +79,5 @@ class bananaCONF(object):
|
||||
self.settingsList[self.inUse][k]=dict(v)
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
logg = fancyLogger()
|
||||
confloader = bananaCONF(workdir=".", logger=logg)
|
||||
confloader.open()
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import colorama
|
||||
|
||||
class fancyLogger(object):
|
||||
'''
|
||||
Colorizza il logger di python, per un' esperienza alla willy wonka
|
||||
Colorizza il logger di python, per un' esperienza stile willy wonka
|
||||
'''
|
||||
def __init__(self, name="Logger", consoleLog=True, fileLog=True):
|
||||
settings = json.load(open("./testSettings.json"))["logger"]
|
||||
|
||||
79
bananaSPLIT/libbabanasplit/testITA.json
Normal file
79
bananaSPLIT/libbabanasplit/testITA.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"version": "v1.1a",
|
||||
"logger": {
|
||||
"logFile": "D:\\Test\\bananaSPLIT.log",
|
||||
"logFormat": "%(asctime)s|%(levelname)-8s| %(message)-50s",
|
||||
"logTimeFormat": "%m-%d %H:%M:%S"
|
||||
},
|
||||
"splitter": {
|
||||
"paths": {
|
||||
"INworkPath": "D:\\Test\\",
|
||||
"OUTworkPath": "D:\\Test\\Separati\\",
|
||||
"OUTnameFormat": "TEST_{docnum}_{year:04d}{month:02d}{day:02d}_{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": [
|
||||
"'",
|
||||
"@",
|
||||
"#",
|
||||
"$",
|
||||
"%",
|
||||
"^",
|
||||
"&"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,10 @@ from libconfload import bananaCONF
|
||||
from libfancylogger import fancyLogger
|
||||
|
||||
|
||||
|
||||
logger = fancyLogger(fileLog = False)
|
||||
confl = bananaCONF()
|
||||
splitter = bananaSPLITTER()
|
||||
logger = fancyLogger()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user