Пример #1
0
def add_parser(subparsers):
    parser = subparsers.add_parser('export',
                                      help='[IN DEVELOPMENT] Export current configuration to be installed with the "import" command',
                                      description=__doc__)

    add_selection_group(parser)

    parser.add_argument('-o', '--output', type=FileType('w'), default=sys.stdout)
    parser.set_defaults(main=main)
Пример #2
0
def add_parser(subparsers):

    parser = subparsers.add_parser('remove',
                                      help='Remove a program definition from chalmers',
                                      description=__doc__,
                                      formatter_class=RawDescriptionHelpFormatter)

    add_selection_group(parser)

    parser.set_defaults(main=main)
Пример #3
0
def add_parser(subparsers):

    parser = subparsers.add_parser(
        'remove',
        help='Remove a program definition from chalmers',
        description=__doc__,
        formatter_class=RawDescriptionHelpFormatter)

    add_selection_group(parser)

    parser.set_defaults(main=main)
Пример #4
0
def add_parser(subparsers):
    parser = subparsers.add_parser('procfile',
                                      help='Start a program',
                                      description=__doc__,
                                      formatter_class=RawDescriptionHelpFormatter)

    parser.add_argument('-f', '--procfile',
                        default='Procfile',
                        help='procfile path (default: %(default)s)')
    cli.add_selection_group(parser)

    parser.set_defaults(main=main)
Пример #5
0
def add_parser(subparsers):
    parser = subparsers.add_parser('procfile',
                                   help='Start a program',
                                   description=__doc__,
                                   formatter_class=RawDescriptionHelpFormatter)

    parser.add_argument('-f',
                        '--procfile',
                        default='Procfile',
                        help='procfile path (default: %(default)s)')
    cli.add_selection_group(parser)

    parser.set_defaults(main=main)
Пример #6
0
def add_parser(subparsers):
    parser = subparsers.add_parser(
        'export',
        help=
        '[IN DEVELOPMENT] Export current configuration to be installed with the "import" command',
        description=__doc__)

    add_selection_group(parser)

    parser.add_argument('-o',
                        '--output',
                        type=FileType('w'),
                        default=sys.stdout)
    parser.set_defaults(main=main)
Пример #7
0
def add_parser(subparsers):
    parser = subparsers.add_parser('start',
                                   help='Start a program',
                                   description=__doc__,
                                   formatter_class=RawDescriptionHelpFormatter)

    cli.add_selection_group(parser)

    parser.add_argument('-w',
                        '--wait',
                        '--no-daemon',
                        action='store_false',
                        dest='daemon',
                        help='Wait for program to exit')
    parser.add_argument('-d',
                        '--daemon',
                        action='store_true',
                        dest='daemon',
                        default=True,
                        help='Run program as daemon')
    parser.add_argument('--stream',
                        '--io',
                        action='store_true',
                        default=sys.stdout.isatty(),
                        help='Multiplex stdout of programs to stdout')
    parser.add_argument('--no-stream',
                        action='store_false',
                        dest='stream',
                        help='Don\'t pip stdout of programs to stdout')

    parser.set_defaults(main=main)

    parser = subparsers.add_parser('restart',
                                   help='Restart a program',
                                   description=__doc__,
                                   formatter_class=RawDescriptionHelpFormatter)

    cli.add_selection_group(parser)

    parser.set_defaults(main=restart_main)
Пример #8
0
def add_parser(subparsers):
    parser = subparsers.add_parser('stop',
                                   help='Stop running a command',
                                   description=__doc__,
                                   formatter_class=RawDescriptionHelpFormatter)

    cli.add_selection_group(parser)
    parser.add_argument(
        '--force',
        action='store_true',
        help='Force kill a program (stopsignal will be ignored)')

    parser.set_defaults(main=main)

    parser = subparsers.add_parser(
        'off',
        help='Don\'t run a program on system boot or `chalmers start --all`',
        description=__doc__,
        formatter_class=RawDescriptionHelpFormatter)

    cli.add_selection_group(parser)

    parser.set_defaults(main=pause_main)

    parser = subparsers.add_parser(
        'on',
        help='Run a program on system boot or `chalmers start --all`',
        description=__doc__,
        formatter_class=RawDescriptionHelpFormatter)

    cli.add_selection_group(parser)

    parser.set_defaults(main=unpause_main)