From 6eaf13317ed781a62ecdb36914aa406a440c36d5 Mon Sep 17 00:00:00 2001 From: Arcnilya Date: Wed, 2 Feb 2022 13:51:01 +0100 Subject: [PATCH] fixed argparse and removed default dirs --- hentai-cropper.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hentai-cropper.py b/hentai-cropper.py index ae21d4a..69fd17a 100644 --- a/hentai-cropper.py +++ b/hentai-cropper.py @@ -13,12 +13,9 @@ import os import argparse # sudo apt-get install python3-pil.imagetk -in_default = r'D:\ML\hentai_ai\dataset_thighs' -out_default = r'D:\ML\hentai_ai\dataset_thighs_cropped' - parser = argparse.ArgumentParser() -parser.add_argument('-i', '--input', type=str, default=in_default, help="input directory") -parser.add_argument('-o', '--output', type=str, default=out_default, help="output directory") +parser.add_argument('-i', '--input', type=str, required=True, help="input directory") +parser.add_argument('-o', '--output', type=str, default="", help="output directory") class AutoScrollbar(ttk.Scrollbar): @@ -192,5 +189,5 @@ root = tk.Tk() root.geometry("500x500") root.resizable(width=False, height=False) args = parser.parse_args() -app = ZoomAdvanced(root, args.input, args.output) +app = ZoomAdvanced(root, args.input, args.output if args.output != "" else args.input) root.mainloop() -- 2.25.1