change show command to status, added command aliases
This commit is contained in:
parent
fac74e651a
commit
2bce1b33e1
13
Command.py
13
Command.py
@ -3,8 +3,8 @@ from datetime import datetime, timedelta
|
||||
import re
|
||||
|
||||
class Command:
|
||||
def __init__(self, timenow, cmdline):
|
||||
self.time = timenow
|
||||
def __init__(self, default_time, cmdline):
|
||||
self.time = default_time
|
||||
self.command = 'start'
|
||||
self.argstr = ''
|
||||
self.parseCommandLine(cmdline)
|
||||
@ -17,11 +17,18 @@ class Command:
|
||||
COMMANDS = {
|
||||
'out' : 1,
|
||||
'report' : 1,
|
||||
'show' : 1,
|
||||
'status' : 1,
|
||||
'fill' : 1,
|
||||
'adjust' : 1,
|
||||
'start' : 1
|
||||
}
|
||||
ALIASES = {
|
||||
'rpt' : 'report',
|
||||
'adj' : 'adjust',
|
||||
'end' : 'out',
|
||||
'st' : 'status',
|
||||
'f' : 'fill'
|
||||
}
|
||||
parts = cmdline.split(None, 1)
|
||||
if len(parts) > 1:
|
||||
timespec = parts[0].strip()
|
||||
|
Loading…
x
Reference in New Issue
Block a user