Rename --show-time-today to --today

This commit is contained in:
Alan Hamlett 2019-05-07 17:49:07 -07:00
parent 23e0778392
commit 8529593453
5 changed files with 6 additions and 6 deletions

View File

@ -10,4 +10,4 @@ usage: wakatime [-h] [--entity FILE] [--key KEY] [--write] [--plugin PLUGIN]
[--include-only-with-project-file] [--extra-heartbeats] [--include-only-with-project-file] [--extra-heartbeats]
[--log-file LOG_FILE] [--api-url API_URL] [--timeout TIMEOUT] [--log-file LOG_FILE] [--api-url API_URL] [--timeout TIMEOUT]
[--sync-offline-activity SYNC_OFFLINE_ACTIVITY] [--sync-offline-activity SYNC_OFFLINE_ACTIVITY]
[--show-time-today] [--config CONFIG] [--verbose] [--version] [--today] [--config CONFIG] [--verbose] [--version]

View File

@ -76,7 +76,7 @@ optional arguments:
sent while online 5 offline heartbeats are synced. Can sent while online 5 offline heartbeats are synced. Can
be used without --entity to only sync offline activity be used without --entity to only sync offline activity
without generating new heartbeats. 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. --config CONFIG Defaults to ~/.wakatime.cfg.
--verbose Turns on debug messages in log file. --verbose Turns on debug messages in log file.
--version show program's version number and exit --version show program's version number and exit

View File

@ -329,7 +329,7 @@ class ArgumentsTestCase(TestCase):
self.patched['wakatime.packages.requests.adapters.HTTPAdapter.send'].return_value = SummaryResponse() self.patched['wakatime.packages.requests.adapters.HTTPAdapter.send'].return_value = SummaryResponse()
config = 'tests/samples/configs/good_config.cfg' config = 'tests/samples/configs/good_config.cfg'
args = ['--config', config, '--show-time-today', '--verbose'] args = ['--config', config, '--today', '--verbose']
retval = execute(args) retval = execute(args)

View File

@ -201,7 +201,7 @@ def parse_arguments():
'online 5 offline heartbeats are synced. Can ' + 'online 5 offline heartbeats are synced. Can ' +
'be used without --entity to only sync offline ' + 'be used without --entity to only sync offline ' +
'activity without generating new heartbeats.') 'activity without generating new heartbeats.')
parser.add_argument('--show-time-today', dest='show_time_today', parser.add_argument('--today', dest='today',
action='store_true', action='store_true',
help='Prints dashboard time for Today, then exits.') help='Prints dashboard time for Today, then exits.')
parser.add_argument('--config', dest='config', action=StoreWithoutQuotes, parser.add_argument('--config', dest='config', action=StoreWithoutQuotes,
@ -248,7 +248,7 @@ def parse_arguments():
if not args.entity: if not args.entity:
if args.file: if args.file:
args.entity = 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') parser.error('argument --entity is required')
if not args.sync_offline_activity: if not args.sync_offline_activity:

View File

@ -42,7 +42,7 @@ def execute(argv=None):
setup_logging(args, __version__) setup_logging(args, __version__)
if args.show_time_today: if args.today:
text, retval = get_time_today(args) text, retval = get_time_today(args)
if text: if text:
print(text) print(text)