Preparing release 3.0.3

This commit is contained in:
Adrien Bourmault 2019-08-05 17:08:23 +02:00 committed by GitHub
parent 1378c8d80e
commit 8c2bdce6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 10 deletions

View File

@ -26,12 +26,13 @@ import os
# CNIRevelator version
verType = "alpha"
version = [3, 0, 2]
version = [3, 0, 3]
verstring_full = "{}.{}.{} {}".format(version[0], version[1], version[2], verType)
verstring = "{}.{}".format(version[0], version[1])
debug = True
changelog = "Version 3.0.2 \nMise-à-jour mineure avec les corrections suivantes :\n- Changement d'icône de l'exécutable\n- Correction d'un bug affectant le logging\n- Correction d'un bug affectant la détection de documents\n- Et autres modifications mineures\n\n" + \
changelog = "Version 3.0.3 \nMise-à-jour mineure avec les corrections suivantes :\n- Correction d'un bug affectant le changelog\n- Correction d'une erreur avec la touche Suppr Arrière et Suppr causant une perte de données\n\n" + \
"Version 3.0.2 \nMise-à-jour mineure avec les corrections suivantes :\n- Changement d'icône de l'exécutable\n- Correction d'un bug affectant le logging\n- Correction d'un bug affectant la détection de documents\n- Et autres modifications mineures\n\n" + \
"Version 3.0.1 \nMise-à-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\nEt les regressions suivantes :\n- Suppression temporaire de la fonction de lecture OCR. Retour planifié pour une prochaine version"
CNIRTesserHash = '5b58db27f7bc08c58a2cb33d01533b034b067cf8'
@ -39,7 +40,7 @@ CNIRFolder = os.getcwd()
CNIRLColor = "#006699"
CNIRName = "CNIRevelator {}".format(verstring)
CNIRCryptoKey = '82Xh!efX3#@P~2eG'
CNIRNewVersion = True
CNIRNewVersion = False
CNIRConfig = CNIRFolder + '\\config\\conf.ig'
CNIRErrLog = CNIRFolder + '\\logs\\error.log'

View File

@ -244,7 +244,7 @@ class mainWindow(Tk):
self.update()
logfile.printdbg('Initialization successful')
def stringValidation(self, char):
def stringValidation(self, keysym):
# analysis
# If we must decide the type of the document
if not self.mrzDecided:
@ -267,6 +267,9 @@ class mainWindow(Tk):
self.logOnTerm("Document detecté : {}\n".format(candidates[0][2]))
self.mrzDecided = candidates[0]
else:
# corrects some problems
if keysym in ["BackSpace", "Delete"]:
return
# get the cursor position
curPos = self.termtext.index(INSERT)
# break the line
@ -299,10 +302,12 @@ class mainWindow(Tk):
# get the cursor
if self.mrzDecided:
position = self.termtext.index(INSERT).split(".")
curPosition = self.termtext.index(INSERT)
position = curPosition.split(".")
pos = (int(position[0]) - 1) * len(self.mrzDecided[0][0]) + (int(position[1]) - 1)
else:
position = self.termtext.index(INSERT).split(".")
curPosition = self.termtext.index(INSERT)
position = curPosition.split(".")
pos = (int(position[1]) - 1)
# verifying that there is no Ctrl-C/Ctrl-V and others
@ -326,9 +331,9 @@ class mainWindow(Tk):
if number == 0:
return "break"
self.mrzChar = self.termtext.get("1.0", "end")[:-1] + "<"*number
self.termtext.delete("1.0","end")
self.termtext.insert("1.0", self.mrzChar)
mrzChar = self.termtext.get(curPosition, "end")[:-1]
self.termtext.delete(curPosition,"end")
self.termtext.insert(curPosition, "<"*number + mrzChar)
self.termtext.mark_set("insert", "%d.%d" % (int(position[0]), int(position[1]) + number))
return "break"
@ -367,7 +372,7 @@ class mainWindow(Tk):
self.mrzChar = tempChar[:pos+1] + event.char + tempChar[pos+1:] + '\n'
# validation of the mrz string
self.stringValidation(event.char)
self.stringValidation(event.keysym)
def pasteValidation(self, event):
"""