From 2bce1b33e13fd79eb3af22f9d6a8f5ec2107399d Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 1 Jan 2011 16:04:36 -0500 Subject: [PATCH] change show command to status, added command aliases --- Command.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Command.py b/Command.py index e02a9bc..3a5bb8c 100644 --- a/Command.py +++ b/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()