def main(argv=None): parser = get_parser() args = parser.parse_args(argv) if args.cmd == "make": make(target=args.target, nocache=bool(args.no_cache)) elif args.cmd == "start": start() elif args.cmd == "stop": stop(clean=args.clean) elif args.cmd == "restartproxy": restartproxy() elif args.cmd == "forum": if args.forumcmd == "manage": manageforum(" ".join(args.managecmd)) elif args.forumcmd == "debug": debugforum() elif args.forumcmd == "import": importforum() elif args.forumcmd == "export": exportforum() else: parser.print_help() elif args.cmd == "webgen": webgen(args.targets, update_repos=args.update_repos, clean=args.clean, debug=args.debug) elif args.cmd == "grunt": grunt() else: parser.print_help()
def main(argv=None): parser = get_parser() args = parser.parse_args(argv) if args.verbose: logging.basicConfig(level=logging.INFO) if args.cmd == 'make': make(target=args.target, nocache=bool(args.no_cache)) elif args.cmd == 'start': start(port=args.port, liveedit=args.liveedit) elif args.cmd == 'stop': stop(clean=args.clean) else: parser.print_help()