示例#1
0
def check_cmd(ctx: click.Context, num: int, grep_string: str,
              list_duplicates: bool, debug_show_memo: bool,
              challenge_start: int):
    from src.plotting.check_plots import check_plots

    check_plots(ctx.obj["root_path"], num, challenge_start, grep_string,
                list_duplicates, debug_show_memo)
示例#2
0
def handler(args, parser):
    if args.command is None or len(args.command) < 1:
        help_message()
        parser.exit(1)

    root_path: Path = args.root_path
    if not root_path.is_dir():
        raise RuntimeError(
            "Please initialize (or migrate) your config directory with chia init."
        )

    initialize_logging("", {"log_stdout": True}, root_path)
    command = args.command
    if command not in command_list:
        help_message()
        parser.exit(1)

    if command == "create":
        create_plots(args, root_path)
    elif command == "check":
        check_plots(args, root_path)
    elif command == "add":
        str_path = args.final_dir
        add_plot_directory(str_path, root_path)
    elif command == "remove":
        str_path = args.final_dir
        remove_plot_directory(str_path, root_path)
    elif command == "show":
        show(root_path)