Give the time only in minutes, to save space
This commit is contained in:
		
							parent
							
								
									96edda1f59
								
							
						
					
					
						commit
						fe714bb385
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -34,8 +34,10 @@ RESULTS = sorted(map( | ||||||
|     }, TW.summary()), |     }, TW.summary()), | ||||||
|                  key=lambda x: x['start']) |                  key=lambda x: x['start']) | ||||||
| IS_ACTIVE = len(list(filter(lambda x: "end" not in x, TW.summary()))) > 0 | IS_ACTIVE = len(list(filter(lambda x: "end" not in x, TW.summary()))) > 0 | ||||||
| 
 | TOTAL_TIME = functools.reduce(lambda total, x: total + x['end'] - x['start'], RESULTS, timedelta()) | ||||||
| print("⏳" if IS_ACTIVE else "⌛", str(functools.reduce(lambda total, x: total + x['end'] - x['start'], RESULTS, timedelta())).split(sep='.', maxsplit=1)[0], "✓" if not IS_ACTIVE else "") | TOTAL_TIME_HOURS, TOTAL_TIME_REMAINDER = divmod(int(TOTAL_TIME.total_seconds()), 3600) | ||||||
|  | TOTAL_TIME_MINUTES, _ = divmod(TOTAL_TIME_REMAINDER, 60) | ||||||
|  | print("⏳" if IS_ACTIVE else "⌛", f"{TOTAL_TIME_HOURS:02}:{TOTAL_TIME_MINUTES:02}", "✓" if not IS_ACTIVE else "") | ||||||
| print("---") | print("---") | ||||||
| print( | print( | ||||||
|     " | font=monospace | size=8\n".join( |     " | font=monospace | size=8\n".join( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue