def build_parser(subparsers, root_path, option_list, name, plotter_desc):
    parser = subparsers.add_parser(name, description=plotter_desc)
    for option in option_list:
        if (option is Options.K):
            parser.add_argument('-k', '--size', type=int, help='K value.', default=32)
        u_default = (0 if (name == 'chiapos') else 256)
        if (option is Options.NUM_BUCKETS):
            parser.add_argument('-u', '--buckets', type=int, help='Number of buckets.', default=u_default)
        if (option is Options.STRIPE_SIZE):
            parser.add_argument('-s', '--stripes', type=int, help='Stripe size.', default=0)
        if (option is Options.TMP_DIR):
            parser.add_argument('-t', '--tmp_dir', type=str, dest='tmpdir', help='Temporary directory 1.', default=(str(root_path) + '/'))
        if (option is Options.TMP_DIR2):
            parser.add_argument('-2', '--tmp_dir2', type=str, dest='tmpdir2', help='Temporary directory 2.', default=(str(root_path) + '/'))
        if (option is Options.FINAL_DIR):
            parser.add_argument('-d', '--final_dir', type=str, dest='finaldir', help='Final directory.', default=(str(root_path) + '/'))
        if (option is Options.BUFF):
            parser.add_argument('-b', '--buffer', type=int, help='Size of the buffer, in MB.', default=0)
        r_default = (4 if (name == 'madmax') else 0)
        if (option is Options.NUM_THREADS):
            parser.add_argument('-r', '--threads', type=int, help='Num threads.', default=r_default)
        if (option is Options.NOBITFIELD):
            parser.add_argument('-e', '--nobitfield', action='store_true', help='Disable bitfield.', default=False)
        if (option is Options.MEMO):
            parser.add_argument('-m', '--memo', type=binascii.unhexlify, help='Memo variable.')
        if (option is Options.ID):
            parser.add_argument('-i', '--id', type=binascii.unhexlify, help='Plot id')
        if (option is Options.PLOT_COUNT):
            parser.add_argument('-n', '--count', type=int, help='Number of plots to create (default = 1)', default=1)
        if (option is Options.MADMAX_NUM_BUCKETS_PHRASE3):
            parser.add_argument('-v', '--buckets3', type=int, help='Number of buckets for phase 3+4 (default = 256)', default=256)
        if (option is Options.MADMAX_WAITFORCOPY):
            parser.add_argument('-w', '--waitforcopy', action='store_true', help='Wait for copy to start next plot', default=False)
        if (option is Options.MADMAX_TMPTOGGLE):
            parser.add_argument('-G', '--tmptoggle', action='store_true', help='Alternate tmpdir/tmpdir2 (default = false)', default=False)
        if (option is Options.POOLCONTRACT):
            parser.add_argument('-c', '--contract', type=str, help='Pool Contract Address (64 chars)', default='')
        if (option is Options.MADMAX_RMULTI2):
            parser.add_argument('-K', '--rmulti2', type=int, help='Thread multiplier for P2 (default = 1)', default=1)
        if (option is Options.POOLKEY):
            parser.add_argument('-p', '--pool-key', type=binascii.unhexlify, help='Pool Public Key (48 bytes)', default='')
        if (option is Options.FARMERKEY):
            parser.add_argument('-f', '--farmerkey', type=binascii.unhexlify, help='Farmer Public Key (48 bytes)', default='')
        if (option is Options.BLADEBIT_WARMSTART):
            parser.add_argument('-w', '--warmstart', action='store_true', help='Warm start', default=False)
        if (option is Options.BLADEBIT_NONUMA):
            parser.add_argument('-m', '--nonuma', action='store_true', help='Disable numa', default=False)
        if (option is Options.VERBOSE):
            parser.add_argument('-v', '--verbose', action='store_true', help='Set verbose', default=False)
        if (option is Options.OVERRIDE_K):
            parser.add_argument('--override-k', dest='override', action='store_true', help='Force size smaller than 32', default=False)
        if (option is Options.ALT_FINGERPRINT):
            parser.add_argument('-a', '--alt_fingerprint', type=int, default=None, help='Enter the alternative fingerprint of the key you want to use')
        if (option is Options.EXCLUDE_FINAL_DIR):
            parser.add_argument('-x', '--exclude_final_dir', action='store_true', help='Skips adding [final dir] to harvester for farming', default=False)
        if (option is Options.CONNECT_TO_DAEMON):
            parser.add_argument('-D', '--connect-to-daemon', action='store_true', help=argparse.SUPPRESS, default=False)
def build_parser(subparsers, root_path, option_list, name, plotter_desc):
    parser = subparsers.add_parser(name, description=plotter_desc)
    for option in option_list:
        if (option is Options.K):
            parser.add_argument('-k', '--size', type=int, help='K value.', default=32)
        u_default = (0 if (name == 'chiapos') else 256)
        if (option is Options.NUM_BUCKETS):
            parser.add_argument('-u', '--buckets', type=int, help='Number of buckets.', default=u_default)
        if (option is Options.STRIPE_SIZE):
            parser.add_argument('-s', '--stripes', type=int, help='Stripe size.', default=0)
        if (option is Options.TMP_DIR):
            parser.add_argument('-t', '--tmp_dir', type=str, dest='tmpdir', help='Temporary directory 1.', default=(str(root_path) + '/'))
        if (option is Options.TMP_DIR2):
            parser.add_argument('-2', '--tmp_dir2', type=str, dest='tmpdir2', help='Temporary directory 2.', default=(str(root_path) + '/'))
        if (option is Options.FINAL_DIR):
            parser.add_argument('-d', '--final_dir', type=str, dest='finaldir', help='Final directory.', default=(str(root_path) + '/'))
        if (option is Options.BUFF):
            parser.add_argument('-b', '--buffer', type=int, help='Size of the buffer, in MB.', default=0)
        r_default = (4 if (name == 'madmax') else 0)
        if (option is Options.NUM_THREADS):
            parser.add_argument('-r', '--threads', type=int, help='Num threads.', default=r_default)
        if (option is Options.NOBITFIELD):
            parser.add_argument('-e', '--nobitfield', action='store_true', help='Disable bitfield.', default=False)
        if (option is Options.MEMO):
            parser.add_argument('-m', '--memo', type=binascii.unhexlify, help='Memo variable.')
        if (option is Options.ID):
            parser.add_argument('-i', '--id', type=binascii.unhexlify, help='Plot id')
        if (option is Options.PLOT_COUNT):
            parser.add_argument('-n', '--count', type=int, help='Number of plots to create (default = 1)', default=1)
        if (option is Options.MADMAX_NUM_BUCKETS_PHRASE3):
            parser.add_argument('-v', '--buckets3', type=int, help='Number of buckets for phase 3+4 (default = 256)', default=256)
        if (option is Options.MADMAX_WAITFORCOPY):
            parser.add_argument('-w', '--waitforcopy', action='store_true', help='Wait for copy to start next plot', default=False)
        if (option is Options.MADMAX_TMPTOGGLE):
            parser.add_argument('-G', '--tmptoggle', action='store_true', help='Alternate tmpdir/tmpdir2 (default = false)', default=False)
        if (option is Options.POOLCONTRACT):
            parser.add_argument('-c', '--contract', type=str, help='Pool Contract Address (64 chars)', default=)
        if (option is Options.MADMAX_RMULTI2):
            parser.add_argument('-K', '--rmulti2', type=int, help='Thread multiplier for P2 (default = 1)', default=1)
        if (option is Options.POOLKEY):
            parser.add_argument('-p', '--pool-key', type=binascii.unhexlify, help='Pool Public Key (48 bytes)', default=)
        if (option is Options.FARMERKEY):
            parser.add_argument('-f', '--farmerkey', type=binascii.unhexlify, help='Farmer Public Key (48 bytes)', default=)
        if (option is Options.BLADEBIT_WARMSTART):
            parser.add_argument('-w', '--warmstart', action='store_true', help='Warm start', default=False)
        if (option is Options.BLADEBIT_NONUMA):
            parser.add_argument('-m', '--nonuma', action='store_true', help='Disable numa', default=False)
        if (option is Options.VERBOSE):
            parser.add_argument('-v', '--verbose', action='store_true', help='Set verbose', default=False)
        if (option is Options.OVERRIDE_K):
            parser.add_argument('--override-k', dest='override', action='store_true', help='Force size smaller than 32', default=False)
        if (option is Options.ALT_FINGERPRINT):
            parser.add_argument('-a', '--alt_fingerprint', type=int, default=None, help='Enter the alternative fingerprint of the key you want to use')
        if (option is Options.EXCLUDE_FINAL_DIR):
            parser.add_argument('-x', '--exclude_final_dir', action='store_true', help='Skips adding [final dir] to harvester for farming', default=False)
        if (option is Options.CONNECT_TO_DAEMON):
            parser.add_argument('-D', '--connect-to-daemon', action='store_true', help=argparse.SUPPRESS, default=False)