#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Author: Eric Kow
# License: CeCILL-B (BSD3 like)

"""
PDTB Swiss-Army knife
"""

import argparse

from educe.pdtb.util.cmd import SUBCOMMANDS
from educe.util import add_subcommand


def main():
    "pdtb-util main"

    arg_parser = argparse.ArgumentParser(description='PDTB Swiss Army Knife')
    subparsers = arg_parser.add_subparsers(help='sub-command help')

    for module in SUBCOMMANDS:
        subparser = add_subcommand(subparsers, module)
        module.config_argparser(subparser)

    arg_parser.add_argument('--verbose', '-v',
                            action='count',
                            default=0)
    args = arg_parser.parse_args()
    args.func(args)

main()
