source: stamper/bin/stamps@ 22:43d14913e8fd

Last change on this file since 22:43d14913e8fd was 22:43d14913e8fd, checked in by Óscar M. Lage <info@…>, 10 years ago

Added -s option to sum all the times and show a resume

  • Property exe set to *
File size: 836 bytes
Line 
1#!/usr/bin/env python
2
3import argparse
4from stamper import Stamper
5
6
7if __name__ == '__main__':
8
9 parser = argparse.ArgumentParser(
10 description='stamps: show recorded times information')
11 parser.add_argument('customer', action="store", nargs='?',
12 help='Show times only for this customer')
13 parser.add_argument('filter', action="store", nargs='?',
14 help='Filter the times by date range')
15 parser.add_argument('-v', '--verbose', action="store_true",
16 help='Include detailed times information')
17 parser.add_argument('-s', '--sum', action="store_true",
18 help='Include sum of times')
19
20 args = parser.parse_args()
21
22 s = Stamper()
23 s.load_stamps()
24 s.show_stamps(args.customer, args.filter, args.verbose, args.sum)
Note: See TracBrowser for help on using the repository browser.