summaryrefslogtreecommitdiff
path: root/quick_lineup.py
blob: 7da857f3de7c587b7d710ae4576c565832efc746 (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
25
26
27
import argparse
import sys
from ql.console import Console


def main():
    parser = argparse.ArgumentParser(
        description='Interface for line-up management in JFR Teamy')

    parser.add_argument('round', metavar='ROUND', type=int,
                        help='round number')
    parser.add_argument('segment', metavar='SEGMENT', type=int,
                        help='segment number')
    parser.add_argument('table', metavar='TABLE', type=int,
                        nargs='?', default=None,
                        help='table to start from')

    arguments = parser.parse_args()

    try:
        Console(arguments.round, arguments.segment, arguments.table).run()
    except:
        print('ERROR: %s' % sys.exc_info()[1])


if __name__ == '__main__':
    main()