예제 #1
0
파일: money.py 프로젝트: davisd/timebook3
def command(timebook, config, rate, sheet, **kwargs):
    # get the db
    cfg=parse_config(config)
    db=Database(timebook, cfg)

    sheet = sheet or db.get_current_sheet()
    if sheet not in db.get_sheet_names():
        parser.error('%s is not a known timesheet' % sheet)

    money(db, sheet, rate)
예제 #2
0
파일: end.py 프로젝트: davisd/timebook3
def command(timebook, config, at, sheet, **kwargs):
    # get the db
    cfg=parse_config(config)
    db=Database(timebook, cfg)

    sheet = sheet or db.get_current_sheet()
    timestamp = parse_date_time_or_now(at)

    if sheet not in db.get_sheet_names():
        parser.error('%s is not a known timesheet' % sheet)

    end(db, sheet, timestamp)