Print more informations about processing
This commit is contained in:
parent
ff1a88c85b
commit
0d94358f10
@ -23,7 +23,7 @@ from colorama import init
|
||||
from termcolor import colored
|
||||
|
||||
|
||||
version = 'dev' # dev/devnocam
|
||||
version = '3.1-1' # dev/devnocam
|
||||
|
||||
configdir = os.path.join(os.getenv('PROGRAMDATA'), 'IFPass')
|
||||
config = os.path.join(configdir, 'IFPass.conf')
|
||||
@ -248,7 +248,7 @@ def bkpdb():
|
||||
|
||||
|
||||
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:
|
||||
im = Image.open(pngtemplate)
|
||||
except FileNotFoundError:
|
||||
@ -287,6 +287,7 @@ def fillcard(clientID, titrename, firstname, dateexp, barcode, picture):
|
||||
|
||||
|
||||
def mergepdf(clientID):
|
||||
print("Fusion du recto et du verso de la carte...", end='')
|
||||
cartefilename = os.path.join(imgdir, clientID + '.pdf')
|
||||
output = PdfFileWriter()
|
||||
|
||||
@ -302,6 +303,7 @@ def mergepdf(clientID):
|
||||
output.write(f)
|
||||
|
||||
os.remove(imgdir + clientID + '_Front.pdf')
|
||||
print(colored('[OK]', 'green'))
|
||||
|
||||
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']))
|
||||
|
||||
elif choix == '3': # Print card
|
||||
cartefilename = os.path.join(imgdir, clientID + '.pdf')
|
||||
printcard(cartefilename)
|
||||
else:
|
||||
print(colored('Choix incorrect !\n', 'red', attrs=['bold']))
|
||||
|
Loading…
Reference in New Issue
Block a user