import argparse
import asyncio


def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "source_user",
        metavar="username",
        type=str,
        nargs="+",
        help="CSV String: A positional argument in CSV form, listing Github usernames. EXAMPLE: ssh-githugger.py sally,sid,jasper",
    )
    parser.add_argument(
        "-a",
        "--annotate",
        dest="annotate",
        action="store_true",
        help="Boolean: Triggers any discovered metadata to be added as an annotation to the key data",
    )
    output_group = parser.add_mutually_exclusive_group()
    output_group.add_argument(
        "-O",
        "--to-stdout",
        dest="stdout",
        action="store_true",
        help="Boolean: Triggers results to be sent to standard out ONLY",
    )
    output_group.add_argument(
        "-f", 
        "--file", 
        type=str, 
        default=None, 
        help="String: The FILENAME that stores the results. "
    )
    parser.add_argument(
        "-t",
        "--target_user",
        type=str,
        default=None,
        help="String: The LINUX USER that the ssh-keys will target",
    )
    parser.add_argument(
        "-tok",
        "--token",
        action="store_true", 
        default=False, 
        help="Boolean: Triggers reading GITHUB_OAUTH_TOKEN environmental variable."
    )
    parser.add_argument(
        "-v",
        "--verbose",
        action="store_true",
        help="Boolean: Show HTTP headers and ratelimit information",
    )
    parser.set_defaults(stdout=False, annotate=False)
    return parser.parse_args()


if __name__ == "__main__":
    args = parse_args()
    print (args) 
