def main():
    parser = argparse.ArgumentParser(description="Track your coding experience")
    parser.add_argument('-i','--initialize', action='store', nargs=1,
                        dest='init',
                        help="Initialize a score file for the specified folder")
    parser.add_argument('-l','--line-counts', action='store', nargs=1,
                        dest='count',
                        help="Show the code line counts for the directory")
    args = parser.parse_args()

    if args.count:
        counts = get_line_counts(args.count[0])
        for lang in sorted(counts):
            print(lang, ": ", counts[lang])
    elif args.init:
        initialize_score_file(args.init[0], SCORE_FILE)
    else:
        try:
            root_dir, scores = read_score_file(SCORE_FILE)
        except __HOLE__:
            print("Score file not found. Call 'level_up -i <directory>' to"
                  " initialize a score folder, or 'level_up -h' for help")
            sys.exit(0)
        update_scores(SCORE_FILE)
dataset/ETHPy150Open the-xkcd-community/the-red-spider-project/src/level_up.py/main