<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __init__ import __version__
import argparse
from geeklog import Geeklog

def create(args):
    Geeklog().create(args.name)

def generate(args):
    Geeklog().generate()

def main():
    parser = argparse.ArgumentParser(description='Geeklog a static Web site generator.', version=__version__)
    subparsers = parser.add_subparsers()

    p_create = subparsers.add_parser('create', help='Create the basis for a Web site in the directory with the specified name.')
    p_create.add_argument('name', help='The name of the Web site to create.')
    p_create.set_defaults(func=create)

    p_generate = subparsers.add_parser('generate', help='Generate the Web site to deploy from the current directory.')
    p_generate.set_defaults(func=generate)

    args = parser.parse_args()
    args.func(args)


if __name__ == "__main__":
    main()<commit_msg>added gen and help aliases<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __init__ import __version__
import argparse
from geeklog import Geeklog

def create(args):
    Geeklog().create(args.name)

def generate(args):
    Geeklog().generate()

def help(args):
    args.parser.print_help()

def main():
    parser = argparse.ArgumentParser(description='Geeklog a static Web site generator.', version=__version__)
    subparsers = parser.add_subparsers()

    # create a basic site with the given name
    p_create = subparsers.add_parser('create', help='Create the basis for a Web site in the directory with the specified name.')
    p_create.add_argument('name', help='The name of the Web site to create.')
    p_create.set_defaults(func=create)

    # generate a site for deployment, generate and gen sub commands do the same
    msg_generate = 'Generate the Web site to deploy from the current directory.'
    p_generate = subparsers.add_parser('generate', help=msg_generate)
    p_generate.set_defaults(func=generate)
    p_gen = subparsers.add_parser('gen', help=msg_generate)
    p_generate.set_defaults(func=generate)

    # make help act the same as -h and --help
    p_help = subparsers.add_parser('help')
    p_help.set_defaults(func=help, parser=parser)

    # process arguments
    args = parser.parse_args()
    args.func(args)


if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.10831889081455806, 'fraction_numerical': 0.0008665511265164644, 'mean_word_length': 4.247727272727273, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3462286', 'n_tokens_mistral': 711, 'n_tokens_neox': 701, 'n_words': 204}