[41] | 1 | import argparse
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | def 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 | return parser
|
---|