Rename --show-time-today to --today
This commit is contained in:
		
							parent
							
								
									23e0778392
								
							
						
					
					
						commit
						8529593453
					
				
					 5 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -10,4 +10,4 @@ usage: wakatime [-h] [--entity FILE] [--key KEY] [--write] [--plugin PLUGIN]
 | 
			
		|||
                [--include-only-with-project-file] [--extra-heartbeats]
 | 
			
		||||
                [--log-file LOG_FILE] [--api-url API_URL] [--timeout TIMEOUT]
 | 
			
		||||
                [--sync-offline-activity SYNC_OFFLINE_ACTIVITY]
 | 
			
		||||
                [--show-time-today] [--config CONFIG] [--verbose] [--version]
 | 
			
		||||
                [--today] [--config CONFIG] [--verbose] [--version]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -76,7 +76,7 @@ optional arguments:
 | 
			
		|||
                        sent while online 5 offline heartbeats are synced. Can
 | 
			
		||||
                        be used without --entity to only sync offline activity
 | 
			
		||||
                        without generating new heartbeats.
 | 
			
		||||
  --show-time-today     Prints dashboard time for Today, then exits.
 | 
			
		||||
  --today               Prints dashboard time for Today, then exits.
 | 
			
		||||
  --config CONFIG       Defaults to ~/.wakatime.cfg.
 | 
			
		||||
  --verbose             Turns on debug messages in log file.
 | 
			
		||||
  --version             show program's version number and exit
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -329,7 +329,7 @@ class ArgumentsTestCase(TestCase):
 | 
			
		|||
        self.patched['wakatime.packages.requests.adapters.HTTPAdapter.send'].return_value = SummaryResponse()
 | 
			
		||||
 | 
			
		||||
        config = 'tests/samples/configs/good_config.cfg'
 | 
			
		||||
        args = ['--config', config, '--show-time-today', '--verbose']
 | 
			
		||||
        args = ['--config', config, '--today', '--verbose']
 | 
			
		||||
 | 
			
		||||
        retval = execute(args)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -201,7 +201,7 @@ def parse_arguments():
 | 
			
		|||
                             'online 5 offline heartbeats are synced. Can ' +
 | 
			
		||||
                             'be used without --entity to only sync offline ' +
 | 
			
		||||
                             'activity without generating new heartbeats.')
 | 
			
		||||
    parser.add_argument('--show-time-today', dest='show_time_today',
 | 
			
		||||
    parser.add_argument('--today', dest='today',
 | 
			
		||||
                        action='store_true',
 | 
			
		||||
                        help='Prints dashboard time for Today, then exits.')
 | 
			
		||||
    parser.add_argument('--config', dest='config', action=StoreWithoutQuotes,
 | 
			
		||||
| 
						 | 
				
			
			@ -248,7 +248,7 @@ def parse_arguments():
 | 
			
		|||
    if not args.entity:
 | 
			
		||||
        if args.file:
 | 
			
		||||
            args.entity = args.file
 | 
			
		||||
        elif (not args.sync_offline_activity or args.sync_offline_activity == 'none') and not args.show_time_today:
 | 
			
		||||
        elif (not args.sync_offline_activity or args.sync_offline_activity == 'none') and not args.today:
 | 
			
		||||
            parser.error('argument --entity is required')
 | 
			
		||||
 | 
			
		||||
    if not args.sync_offline_activity:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ def execute(argv=None):
 | 
			
		|||
 | 
			
		||||
    setup_logging(args, __version__)
 | 
			
		||||
 | 
			
		||||
    if args.show_time_today:
 | 
			
		||||
    if args.today:
 | 
			
		||||
        text, retval = get_time_today(args)
 | 
			
		||||
        if text:
 | 
			
		||||
            print(text)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue