Parse command-line arguments

def parse_args():
    """Parse command-line arguments"""
    prog = 'github-list-repos'

    parser = argparse.ArgumentParser(
        prog=prog,
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description=textwrap.dedent("""
        List repositories on Github using various criteria.

        Examples:

            {prog} --org lsst

            {prog} \\
                    --hide 'Data Management' \\
                    --hide 'Owners' \\
                    --org lsst

        Note: --mint and --maxt limits are applied after --hide.

        So for example,

            {prog} --maxt 0 --hide Owners --org lsst

        returns the list of repos that are owned by no team besides Owners.
        """).format(prog=prog),
        epilog='Part of codekit: https://github.com/lsst-sqre/sqre-codekit')
    parser.add_argument(
        '-o', '--org',
        dest='organization',
        help='GitHub Organization name',
        required=True)
    parser.add_argument(
        '--hide', action='append',
        help='Hide a specific team from the output')
    parser.add_argument(
        '--mint', type=int, default='0',
        help='Only list repos that have more than MINT teams')
    parser.add_argument(
        '--maxt', type=int,
        help='Only list repos that have fewer than MAXT teams')
    parser.add_argument(
        '--delimiter', default=', ',
        help='Character(s) separating teams in print out')
    parser.add_argument(
        '--token-path',
        default='~/.sq_github_token',
        help='Use a token (made with github-auth) in a non-standard loction')
    parser.add_argument(
        '--token',
        default=None,
        help='Literal github personal access token string')
    parser.add_argument(
        '-d', '--debug',
        action='count',
        default=codetools.debug_lvl_from_env(),
        help='Debug mode (can specify several times)')
    parser.add_argument('-v', '--version', action=codetools.ScmVersionAction)
    return parser.parse_args()