Ejemplo n.º 1
0
def cmd():
    """
    run from cmd
    :return:
    """
    args = parser.parse_args()
    command = args.command
    # init workspace for gerapy
    if command == 'init':
        from gerapy.cmd.init import init
        init(args.folder)
    # generate code according to configuration
    elif command == 'generate':
        from gerapy.cmd.generate import generate
        generate(args.project)
    # debug parse for project
    elif command == 'parse':
        from gerapy.cmd.parse import parse
        parse(args)
    # init admin
    elif command == 'initadmin':
        from gerapy.cmd.initadmin import initadmin
        initadmin()
    else:
        from gerapy.server.manage import manage
        manage()
Ejemplo n.º 2
0
def cmd():
    args = parser.parse_args()
    command = args.command
    if command == 'init':
        init(args.folder)
    elif command == 'generate':
        generate(args.project)
    elif command == 'parse':
        parse(args)
    else:
        manage()
Ejemplo n.º 3
0
def cmd():
    """
    run from cmd
    :return:
    """
    args = parser.parse_args()
    command = args.command
    # init workspace for gerapy
    if command == 'init':
        init(args.folder)
    # generate code according to configuration
    elif command == 'generate':
        generate(args.project)
    # debug parse for project
    elif command == 'parse':
        parse(args)
    else:
        manage()