def SPSort(context): args = context.args PARSER = FullHelpArgumentParser() SORT = cli.SortArgs( PARSER, "sort", "This command lets you sort images using various methods.") ARGUMENTS = PARSER.parse_args([ "--input", args.inputData, "--output", args.outputData, "--sort-by", args.sortBy, "--ref_threshold", str(args.refThreshold), "--final-process", args.finalProcess, "--group-by", args.groupBy, "--bins", str(args.bins), ]) ARGUMENTS.func(ARGUMENTS) return args.outputData
if __name__ == "__main__": _TOOLS_WARNING = "Please backup your data and/or test the tool you want " _TOOLS_WARNING += "to use with a smaller data set to make sure you " _TOOLS_WARNING += "understand how it works." print(_TOOLS_WARNING) PARSER = FullHelpArgumentParser() SUBPARSER = PARSER.add_subparsers() ALIGN = cli.AlignmentsArgs(SUBPARSER, "alignments", "This command lets you perform various tasks pertaining to an " "alignments file.") PREVIEW = cli.PreviewArgs(SUBPARSER, "preview", "This command allows you to preview swaps to tweak convert " "settings.") EFFMPEG = cli.EffmpegArgs(SUBPARSER, "effmpeg", "This command allows you to easily execute common ffmpeg tasks.") RESTORE = cli.RestoreArgs(SUBPARSER, "restore", "This command lets you restore models from backup.") SORT = cli.SortArgs(SUBPARSER, "sort", "This command lets you sort images using various methods.") PARSER.set_defaults(func=bad_args) ARGUMENTS = PARSER.parse_args() ARGUMENTS.func(ARGUMENTS)