source: stamper/stamper/cli.py@ 55:a546fa08081b

Last change on this file since 55:a546fa08081b was 55:a546fa08081b, checked in by Borja Lopez <borja@…>, 6 years ago

Added -p parameter, enabling push of stamps to a stamp collector server.

IMPORTANT: Before being able to push stamps, you have to set proper URLs,
USERNAME and PASSWORD values in stamper.py

File size: 1.3 KB
Line 
1import argparse
2
3
4def build_args_parser():
5 parser = argparse.ArgumentParser(
6 description='stamps: show recorded times information')
7 parser.add_argument('customer', action="store", nargs='?',
8 help='Show times only for this customer')
9 parser.add_argument('filter', action="store", nargs='?',
10 help='Filter the times by date range')
11 parser.add_argument('-v', '--verbose', action="store_true",
12 help='Include detailed times information')
13 parser.add_argument('-s', '--sum', action="store_true",
14 help='Include sum of times')
15 parser.add_argument('-g', '--graph', action="store_true",
16 help='Generate a SVG graph')
17 parser.add_argument('-t', '--timeline', action="store_true",
18 help='Show a timeline of recorded times')
19 parser.add_argument('-d', '--delete', action="store", type=int,
20 help='Delete up to n recorded stamps')
21 parser.add_argument('-i', '--import', action="store", dest="import_file",
22 help='Import stamps from the given file')
23 parser.add_argument('-p', '--push', action="store_true",
24 help='Push stamps to a remote stamps collector server')
25 return parser
Note: See TracBrowser for help on using the repository browser.