mirror of
https://gitlab.os-k.eu/neox/CNIRevelator.git
synced 2023-08-25 14:03:10 +02:00
Preparing 3.0.1 release
This commit is contained in:
parent
c2e1ff6c8e
commit
f09533d4b3
@ -25,12 +25,12 @@
|
||||
import os
|
||||
|
||||
# CNIRevelator version
|
||||
version = [3, 0, 0]
|
||||
version = [3, 0, 1]
|
||||
verstring_full = "{}.{}.{}".format(version[0], version[1], version[2])
|
||||
verstring = "{}.{}".format(version[0], version[1])
|
||||
debug = True
|
||||
|
||||
changelog = "Mise-à-jour majeure avec corrections suivantes :\n- Renouvellement de la signature numérique de l'exécutable\n- Amélioration de présentation du log en cas d'erreur\n- Refonte totale du code source et désobfuscation\n- Téléchargements en HTTPS fiables avec somme de contrôle"
|
||||
changelog = "Mise-à-jour majeure avec les corrections suivantes :\n- Renouvellement de la signature numérique de l'exécutable\n- Amélioration de présentation du log en cas d'erreur\n- Refonte totale du code source et désobfuscation\n- Téléchargements en HTTPS fiables avec somme de contrôle\n- Nouveaux terminaux d'entrées : un rapide (731) et un complet\n- Détection des documents améliorée, possibilité de choix plus fin\n\naEt les regressions suivantes :\n- Suppression temporaire de la fonction de lecture OCR. Retour planifié pour une prochaine version"
|
||||
|
||||
CNIRTesserHash = '5b58db27f7bc08c58a2cb33d01533b034b067cf8'
|
||||
CNIRFolder = os.getcwd()
|
||||
|
@ -98,7 +98,7 @@ class LoginDialog(Toplevel):
|
||||
self.geometry('%dx%d+%d+%d' % (w, h, x, y))
|
||||
self.bind("<Return>", self.connecti)
|
||||
|
||||
def connecti(self):
|
||||
def connecti(self, event):
|
||||
self.login = self.entry_login.get().strip()
|
||||
self.key = self.entry_pass.get().strip()
|
||||
self.destroy()
|
||||
|
@ -488,7 +488,7 @@ class mainWindow(Tk):
|
||||
#print(docInfos)
|
||||
# display the infos
|
||||
for key in [ e for e in docInfos ]:
|
||||
print(docInfos[key])
|
||||
#print(docInfos[key])
|
||||
if key in ["CODE", "CTRL"]:
|
||||
continue
|
||||
if not docInfos[key] == False:
|
||||
|
11
src/mrz.py
11
src/mrz.py
@ -838,7 +838,7 @@ def docMatch(doc, strs):
|
||||
# logfile.printdbg(" REGEX : {}, match : {}".format(regex, matching))
|
||||
# exit the loop
|
||||
|
||||
logfile.printdbg("{} level : {}/{} (+{})".format(doc[2], level, nchar, bonus))
|
||||
#logfile.printdbg("{} level : {}/{} (+{})".format(doc[2], level, nchar, bonus))
|
||||
return (level, nchar, bonus)
|
||||
|
||||
def allDocMatch(strs, final=False):
|
||||
@ -963,7 +963,7 @@ def getDocInfos(doc, code):
|
||||
|
||||
for field in infoTypes:
|
||||
|
||||
value = code[ field[1][0] : field[1][1] ]
|
||||
value = code[ field[1][0] : field[1][1] ].replace("<", " ").strip()
|
||||
|
||||
# State code
|
||||
if field[0] == 'PAYS' or field[0] == 'NAT':
|
||||
@ -1008,11 +1008,14 @@ def getDocInfos(doc, code):
|
||||
res["NO"] = value
|
||||
|
||||
elif field[0] == 'FACULT':
|
||||
res["INDIC"] += value
|
||||
try:
|
||||
res["INDIC"] += value
|
||||
except KeyError:
|
||||
res["INDIC"] = value
|
||||
# All other cases
|
||||
else:
|
||||
if value != "":
|
||||
res[field[0]] = value.replace("<", " ").strip()
|
||||
res[field[0]] = value
|
||||
|
||||
return res
|
||||
|
||||
|
@ -270,7 +270,33 @@ def umain():
|
||||
return 0
|
||||
|
||||
# Cleaner for the old version if detected
|
||||
if len(sys.argv) > 1:
|
||||
if len(sys.argv) > 2:
|
||||
globs.CNIRNewVersion = True
|
||||
launcherWindow.printmsg('Deleting old version !')
|
||||
logfile.printdbg("Old install detected : {}".format(sys.argv[1]))
|
||||
while os.path.exists(str(sys.argv[2])):
|
||||
try:
|
||||
os.remove(str(sys.argv[2]))
|
||||
except Exception as e:
|
||||
logfile.printerr(str(e))
|
||||
logfile.printdbg('Trying stop the process !')
|
||||
launcherWindow.printmsg('Fail :{}'.format(e))
|
||||
try:
|
||||
for process in psutil.process_iter():
|
||||
if process.name() == 'CNIRevelator.exe':
|
||||
logfile.printdbg('Process found. Command line: {}'.format(process.cmdline()))
|
||||
if process.pid == os.getpid():
|
||||
logfile.printdbg("Don't touch us ! {} = {}".format(process.pid, os.getpid()))
|
||||
else:
|
||||
logfile.printdbg('Terminating process !')
|
||||
process.terminate()
|
||||
os.remove(str(sys.argv[2]))
|
||||
break
|
||||
except Exception as e:
|
||||
logfile.printerr(str(e))
|
||||
launcherWindow.printmsg('Fail :{}'.format(e))
|
||||
launcherWindow.printmsg('Starting...')
|
||||
elif len(sys.argv) > 1:
|
||||
globs.CNIRNewVersion = True
|
||||
launcherWindow.printmsg('Deleting old version !')
|
||||
logfile.printdbg("Old install detected : {}".format(sys.argv[1]))
|
||||
@ -290,6 +316,7 @@ def umain():
|
||||
else:
|
||||
logfile.printdbg('Terminating process !')
|
||||
process.terminate()
|
||||
shutil.rmtree(str(sys.argv[1]))
|
||||
break
|
||||
except Exception as e:
|
||||
logfile.printerr(str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user