def start(project, logfile, time_format): "start tracking for <project>" write(server.start(project, read(logfile, time_format)), logfile, time_format) print "starting work on %s" % colored(project, attrs=['bold']) print " at %s" % colored(server.date_to_txt(now(), time_format), 'green')
def start(project, logfile, time_format): "start tracking for <project>" records = read(logfile, time_format) if records and not records[-1][1][1]: print "error: there is a project already active" return write(server.start(project, records), logfile, time_format) print "starting work on %s" % colored(project, attrs=['bold']) print " at %s" % colored(server.date_to_txt(now(), time_format), 'green')