import argparse def generate_argument_parser(): parser = argparse.ArgumentParser(prog="Image Processor", description="A simple image format convert and resize tool.", epilog="Use any combination of arguments.") parser.add_argument("-H", "--height", type=int, help="max height for vertical images") parser.add_argument("-W", "--width", type=int, help="max width for horizontal images") parser.add_argument("-e", "--extension", type=str, default="png",help="extension of the processed files") parser.add_argument("-d", "--directory", type=str, help="directory of files to process") parser.add_argument("-f", "--files", nargs="+", type=list, help="list of files to process") parser.add_argument("-o", "--output", type=str, default="./",help="directory for the output files") return parser