change show command to status, added command aliases

This commit is contained in:
Josh Holtrop 2011-01-01 16:04:36 -05:00
parent fac74e651a
commit 2bce1b33e1

View File

@ -3,8 +3,8 @@ from datetime import datetime, timedelta
import re import re
class Command: class Command:
def __init__(self, timenow, cmdline): def __init__(self, default_time, cmdline):
self.time = timenow self.time = default_time
self.command = 'start' self.command = 'start'
self.argstr = '' self.argstr = ''
self.parseCommandLine(cmdline) self.parseCommandLine(cmdline)
@ -17,11 +17,18 @@ class Command:
COMMANDS = { COMMANDS = {
'out' : 1, 'out' : 1,
'report' : 1, 'report' : 1,
'show' : 1, 'status' : 1,
'fill' : 1, 'fill' : 1,
'adjust' : 1, 'adjust' : 1,
'start' : 1 'start' : 1
} }
ALIASES = {
'rpt' : 'report',
'adj' : 'adjust',
'end' : 'out',
'st' : 'status',
'f' : 'fill'
}
parts = cmdline.split(None, 1) parts = cmdline.split(None, 1)
if len(parts) > 1: if len(parts) > 1:
timespec = parts[0].strip() timespec = parts[0].strip()