adding definition for timespans for ls and acc command
This commit is contained in:
@@ -7,7 +7,8 @@ def create_parser():
|
||||
subparsers = parser.add_subparsers(dest="command", help="Sub-command help")
|
||||
|
||||
# Create the parser for the "ls" command
|
||||
_ = subparsers.add_parser("ls", help="List all events.")
|
||||
parser_ls = subparsers.add_parser("ls", help="List events.")
|
||||
parser_ls.add_argument("-s", "--span", choices=['d', 'w', 'lw'], help="Display only envent in a certain time span (d = current day; w = current week; lw = last week)")
|
||||
|
||||
# Create the parser for the "ps" command
|
||||
_ = subparsers.add_parser("ps", help="Show the currently running event.")
|
||||
@@ -30,5 +31,6 @@ def create_parser():
|
||||
# Create the parser for the "acc" command
|
||||
parser_end = subparsers.add_parser("acc", help="Accumulate the duration of events.")
|
||||
parser_end.add_argument("query", help="The regex matching for the name of the event.")
|
||||
parser_end.add_argument("-s", "--span", choices=['d', 'w', 'lw'], help="Display only envent in a certain time span (d = current day; w = current week; lw = last week)")
|
||||
|
||||
return parser
|
||||
|
||||
Reference in New Issue
Block a user