blob: 768a1ed87a439250adf27f9b18036a0e2032ffee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env python
import argparse
from gentoostats import list
from gentoostats import search
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--server', default='soc.dev.gentoo.org')
parser.add_argument('-u', '--url', default='/gentoostats')
# http://bugs.python.org/issue9253
subparsers = parser.add_subparsers(dest='command')
subparsers.required = True
list.add_parser(subparsers)
search.add_parser(subparsers)
args = parser.parse_args()
args.command(args)
if __name__ == "__main__":
main()
|