Compare commits
	
		
			3 Commits
		
	
	
		
			b9a156d694
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | fcf4d914c9 | ||
|  | 4b3c6a33c0 | ||
|  | 856e7fc034 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1,3 @@ | ||||
| venv/ | ||||
| *.ics | ||||
| config | ||||
|   | ||||
							
								
								
									
										13
									
								
								citoyen.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								citoyen.py
									
									
									
									
									
								
							| @@ -212,7 +212,7 @@ def main(): | ||||
|     parserdump.add_argument("-o", "--output", dest='calendar', required=True, default='cal.ics', help="Output calendar file.") | ||||
|     args = parser.parse_args() | ||||
|      | ||||
|     logger.info("Initial arguments: %s" % args) | ||||
|     logger.debug("Initial arguments: %s" % args) | ||||
|      | ||||
|     if args.debug: | ||||
|         logger.info('Setting logging to debug mode') | ||||
| @@ -236,16 +236,20 @@ def main(): | ||||
|                 args.login = config.get('Login','login') | ||||
|             if 'password' in options: | ||||
|                 args.password = config.get('Login','password') | ||||
|         if 'Espace' in sections: | ||||
|             options = config.options('Espace') | ||||
|             if 'ville' in options: | ||||
|                 args.city = config.get('Espace', 'ville') | ||||
|      | ||||
|     logger.info("Final arguments: %s" % args) | ||||
|     logger.debug("Final arguments: %s" % args) | ||||
|      | ||||
|     if args.city == None: | ||||
|         logger.info('City must be provided.') | ||||
|         logger.error('City must be provided.') | ||||
|         parser.print_help() | ||||
|         exit(-1) | ||||
|      | ||||
|     if args.login == None: | ||||
|         logger.info('Login must be provided.') | ||||
|         logger.error('Login must be provided.') | ||||
|         parser.print_help() | ||||
|         exit(-1) | ||||
|      | ||||
| @@ -271,6 +275,7 @@ def main(): | ||||
|             resaNum+=1 | ||||
|     elif (args.command == 'D'): | ||||
|         resaType = list(resaTypes)[args.index-1] | ||||
|         logger.info('Retrieve reservations for "%s"' % resaType) | ||||
|         url = resaTypes[resaType] | ||||
|         dumpReservation(resaType, baseURL, args.city, url, cookies, args.calendar) | ||||
|      | ||||
|   | ||||
							
								
								
									
										5
									
								
								config.example
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								config.example
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| [Login] | ||||
| login=[my_login] | ||||
| password=[my_password] | ||||
| [Espace] | ||||
| ville=[my_city] | ||||
		Reference in New Issue
	
	Block a user