9 Commits

Author SHA1 Message Date
3e35e6fb05 New builds 2019-04-02 12:09:54 +02:00
48465446ec Increment version to 3.1-1 2019-04-02 12:05:21 +02:00
971bf846ab Merge branch 'dev' 2019-04-02 12:03:37 +02:00
d879cf389d Fixed bug change date 2019-04-02 12:03:07 +02:00
8138ebd95c Add builds 2019-03-25 09:49:35 +01:00
483d7e2f6f Fixed con files 2019-03-22 13:02:15 +01:00
e7f78e6e39 Increment version to 3.1 2019-03-22 12:51:33 +01:00
622ad63e0a Merge branch 'dev' 2019-03-22 12:27:09 +01:00
a93c05bcc3 Allow to choose date manually 2019-03-22 12:23:55 +01:00
5 changed files with 53 additions and 20 deletions

View File

@ -23,7 +23,7 @@ from colorama import init
from termcolor import colored
version = '3.0-1' # dev/devnocam
version = '3.1-1' # dev/devnocam
configdir = os.path.join(os.getenv('PROGRAMDATA'), 'IFPass')
config = os.path.join(configdir, 'IFPass.conf')
@ -311,6 +311,17 @@ def printcard(cartefilename):
subprocess.Popen('"' + AcrobatReader + '"' + ' /h /n /t ' + cartefilename + ' ' + printername, shell=False)
def getdateexp():
while True:
dateexp = input("Quelle date d'expiration voulez-vous mettre (Format : JJ/MM/AAAA)? : ")
match = re.fullmatch(r'^(0[1-9]|1[0-9]|2[0-9]|3[0-1])/(0[1-9]|1[0-2])/([0-9]){4}$', dateexp)
if match:
break
else:
print('Mauvais format ! JJ/MM/AAAA, exemple : 01/08/2042')
return dateexp
def newmember():
while "the informations are incorrect": # Loop Filling informations
os.system('cls')
@ -322,13 +333,7 @@ def newmember():
dateexp = dateexp.strftime('%d/%m/%Y')
changeexp = yes_or_no("Voulez-vous choisir la date d'expiration ?")
if changeexp:
while True:
dateexp = input("Quelle date d'expiration voulez-vous mettre (Format : JJ/MM/AAAA)? : ")
match = re.fullmatch(r'^(0[1-9]|1[0-9]|2[0-9]|3[0-1])/(0[1-9]|1[0-2])/([0-9]){4}$', dateexp)
if match:
break
else:
print('Mauvais format ! JJ/MM/AAAA, exemple : 01/08/2042')
dateexp = getdateexp()
os.system('cls')
print("Titre : ", colored(titre, 'green'))
@ -404,7 +409,7 @@ def membersearch():
elif diff == 0:
print(colored("Il s'agit du dernier jour de l'abonnement, il expirera demain.", 'yellow', attrs=['bold']))
print('\n1 - Modifier', "2 - Renouveller l'abonnement", '3 - Imprimer la carte', '0 - Menu principal', sep='\n')
print('\n1 - Modifier', "2 - Renouveller l'abonnement / Choisir un nouvelle date d'expiration", '3 - Imprimer la carte', '0 - Menu principal', sep='\n')
choix = input('Choix : ')
if choix == '0':
os.system('cls')
@ -431,6 +436,10 @@ def memberdo(choix, member):
titre, firstname, surname, dateexp = memberedit(titre, firstname, surname, clientID, dateinsc, dateexp)
elif choix == '2': # Renew subscription
changeexp = yes_or_no("Voulez-vous choisir la date d'expiration ?")
if changeexp:
dateexp = getdateexp()
else:
dateexp = datetime.strptime(dateexp, '%d/%m/%Y').date()
diff = (dateexp - date.today()).days
if diff >= 0:

View File

@ -1,6 +1,6 @@
[Application]
name=IFPass
version=3.0-1
version=3.1-1
entry_point=IFPass:main
icon=IF.ico
console=true
@ -13,6 +13,18 @@ bitness=64
[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
# https://pypi.org/project/code128/
# https://pypi.org/project/colorama/
# https://pypi.org/project/pyfiglet/
# https://pypi.org/project/numpy/
# https://pypi.org/project/opencv-python/
# https://pypi.org/project/Pillow/
# https://pypi.org/project/pywin32/
# https://pypi.org/project/six/
# https://pypi.org/project/setuptools/
# https://pypi.org/project/PyMuPDF/
# https://pypi.org/project/pywinauto/
pypi_wheels=code128==0.3
colorama==0.4.1
pyfiglet==0.8.post1
@ -22,7 +34,7 @@ pypi_wheels=code128==0.3
pywin32==224
six==1.12.0
setuptools==40.8.0
PyMuPDF==1.14.8
PyMuPDF==1.14.12
pywinauto==0.6.6
# Must check if future updates of the following packages provide .whl files
# pywinauto needs to be downloaded manually and edit setup to match platform=win32

View File

@ -1,6 +1,6 @@
[Application]
name=IFPass
version=3.0-1
version=3.1-1
entry_point=IFPass:main
icon=IF.ico
console=true
@ -13,6 +13,18 @@ bitness=32
[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
# https://pypi.org/project/code128/
# https://pypi.org/project/colorama/
# https://pypi.org/project/pyfiglet/
# https://pypi.org/project/numpy/
# https://pypi.org/project/opencv-python/
# https://pypi.org/project/Pillow/
# https://pypi.org/project/pywin32/
# https://pypi.org/project/six/
# https://pypi.org/project/setuptools/
# https://pypi.org/project/PyMuPDF/
# https://pypi.org/project/pywinauto/
pypi_wheels=code128==0.3
colorama==0.4.1
pyfiglet==0.8.post1
@ -22,7 +34,7 @@ pypi_wheels=code128==0.3
pywin32==224
six==1.12.0
setuptools==40.8.0
PyMuPDF==1.14.8
PyMuPDF==1.14.12
pywinauto==0.6.6
# Must check if future updates of the following packages provide .whl files
# pywinauto needs to be downloaded manually and edit setup to match platform=win32