Print more informations about processing

This commit is contained in:
Jordan ERNST 2019-06-20 10:21:42 +02:00
parent ff1a88c85b
commit 0d94358f10

View File

@ -23,7 +23,7 @@ from colorama import init
from termcolor import colored from termcolor import colored
version = 'dev' # dev/devnocam version = '3.1-1' # dev/devnocam
configdir = os.path.join(os.getenv('PROGRAMDATA'), 'IFPass') configdir = os.path.join(os.getenv('PROGRAMDATA'), 'IFPass')
config = os.path.join(configdir, 'IFPass.conf') config = os.path.join(configdir, 'IFPass.conf')
@ -248,7 +248,7 @@ def bkpdb():
def fillcard(clientID, titrename, firstname, dateexp, barcode, picture): def fillcard(clientID, titrename, firstname, dateexp, barcode, picture):
print("Création de la carte avec les informations...", end='') print("Création du verso de la carte avec les informations...", end='')
try: try:
im = Image.open(pngtemplate) im = Image.open(pngtemplate)
except FileNotFoundError: except FileNotFoundError:
@ -287,6 +287,7 @@ def fillcard(clientID, titrename, firstname, dateexp, barcode, picture):
def mergepdf(clientID): def mergepdf(clientID):
print("Fusion du recto et du verso de la carte...", end='')
cartefilename = os.path.join(imgdir, clientID + '.pdf') cartefilename = os.path.join(imgdir, clientID + '.pdf')
output = PdfFileWriter() output = PdfFileWriter()
@ -302,6 +303,7 @@ def mergepdf(clientID):
output.write(f) output.write(f)
os.remove(imgdir + clientID + '_Front.pdf') os.remove(imgdir + clientID + '_Front.pdf')
print(colored('[OK]', 'green'))
return cartefilename return cartefilename
@ -481,6 +483,7 @@ def memberdo(choix, member):
print(colored("La date d'expiration a bien été mise à jour !\n", 'blue', attrs=['bold'])) print(colored("La date d'expiration a bien été mise à jour !\n", 'blue', attrs=['bold']))
elif choix == '3': # Print card elif choix == '3': # Print card
cartefilename = os.path.join(imgdir, clientID + '.pdf')
printcard(cartefilename) printcard(cartefilename)
else: else:
print(colored('Choix incorrect !\n', 'red', attrs=['bold'])) print(colored('Choix incorrect !\n', 'red', attrs=['bold']))