Commit 200085d7f050fba4d2e5fb384a1d74e6bc4d022e
* report.py: Fixing typo and adding some documentation about options for the script.
| | | | 2 | import datetime | 2 | import datetime |
---|
3 | import query | 3 | import query |
---|
4 | | 4 | |
---|
5 | parser = argparse.ArgumentParser(description='Generate report for the date specified.') | | 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 | parser.add_argument('-s','--start-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="Start date (YYYY-MM-DD)") | 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 | parser.add_argument('-e','--end-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="End date (YYYY-MM-DD)") | 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 | parser.add_argument('-S','--start-time', type=str, default = '00:00:00', help="Start time (HH:MM:SS)") | 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)") | | 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 | args = parser.parse_args() | 15 | args = parser.parse_args() |
---|