from modules.image_parser import (parse_image, parse_whole_directory)
from modules.argument_parser import (generate_argument_parser)

# NOTE: arguments
# -H <height> : max height of vertical images
# -W <width> : max width of horizontal images
# -e <extension> : extension of the output files
# -d <directory> : input directory path
# -f <file/s> : file or list of files (paths) to parse
# -o <directory> : output directory path
# -h : help
if __name__ == "__main__":
	arg_parser = generate_argument_parser()
	args = arg_parser.parse_args()

	print(args, args.extension)

	# Parse directory
	if (args.directory != None):
		parse_whole_directory(args.directory, args.output, args.height, args.width, args.extension)

	# Parse individual files
	if (args.files != None):
		for file in args.files:
			parse_image(file, args.output, args.height, args.width, args.extension)

