Commit 200085d7f050fba4d2e5fb384a1d74e6bc4d022e

  • avatar
  • arvind
  • Thu Jan 09 21:10:04 IST 2014
* report.py: Fixing typo and adding some documentation about options for the script.
report.py
(5 / 2)
  
22import datetime
33import query
44
5parser = argparse.ArgumentParser(description='Generate report for the date specified.')
5parser = 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.""")
69parser.add_argument('-s','--start-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="Start date (YYYY-MM-DD)")
710parser.add_argument('-e','--end-date', type=str, default=datetime.datetime.strftime(datetime.date.today(), '%Y-%m-%d'), help="End date (YYYY-MM-DD)")
811parser.add_argument('-S','--start-time', type=str, default = '00:00:00', help="Start time (HH:MM:SS)")
9parser.add_argument('-E','--end-time', type=str, default='23:59:59', help="Start time (HH:MM:SS)")
12parser.add_argument('-E','--end-time', type=str, default='23:59:59', help="End time (HH:MM:SS)")
1013
1114
1215args = parser.parse_args()