Commit 200085d7f050fba4d2e5fb384a1d74e6bc4d022e
- Diff rendering mode:
- inline
- side by side
report.py
(5 / 2)
  | |||
2 | 2 | import datetime | |
3 | 3 | import query | |
4 | 4 | ||
5 | parser = argparse.ArgumentParser(description='Generate report for the date specified.') | ||
5 | parser = argparse.ArgumentParser(description="""Generate report for the date specified. | ||
6 | Start and end date default to present day. | ||
7 | Start time defaults to 00:00:00. | ||
8 | End time defaults to 23:59:59.""") | ||
6 | 9 | parser.add_argument('-s','--start-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="Start date (YYYY-MM-DD)") | |
7 | 10 | parser.add_argument('-e','--end-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="End date (YYYY-MM-DD)") | |
8 | 11 | parser.add_argument('-S','--start-time', type=str, default = '00:00:00', help="Start time (HH:MM:SS)") | |
9 | parser.add_argument('-E','--end-time', type=str, default='23:59:59', help="Start time (HH:MM:SS)") | ||
12 | parser.add_argument('-E','--end-time', type=str, default='23:59:59', help="End time (HH:MM:SS)") | ||
10 | 13 | ||
11 | 14 | ||
12 | 15 | args = parser.parse_args() |