source: stamper/bin/stamps@ 28:9afaa509f383

Last change on this file since 28:9afaa509f383 was 28:9afaa509f383, checked in by Borja Lopez <borja@…>, 10 years ago

Added the "timeline" feature (stamps -t), which prints on screen a
timeline of the recorded entries, in betabug's stamp "old style".

Useful for two purposes:

1) Export recorded times to be used by betabug's stamp

2) Get a quick view of your latest records (to notice if the last

one was a start, for example

  • Property exe set to *
File size: 1.1 KB
RevLine 
[0]1#!/usr/bin/env python
2
[10]3import argparse
[0]4from stamper import Stamper
5
6
7if __name__ == '__main__':
8
[10]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')
[22]17 parser.add_argument('-s', '--sum', action="store_true",
18 help='Include sum of times')
[23]19 parser.add_argument('-g', '--graph', action="store_true",
20 help='Generate a SVG graph')
[28]21 parser.add_argument('-t', '--timeline', action="store_true",
22 help='Show a timeline of recorded times')
[10]23
24 args = parser.parse_args()
25
[0]26 s = Stamper()
27 s.load_stamps()
[28]28 if args.timeline:
29 s.timeline()
30 else:
31 s.show_stamps(args.customer, args.filter, args.verbose, args.sum,
32 args.graph)
Note: See TracBrowser for help on using the repository browser.