Compare commits

...

2 Commits

Author SHA1 Message Date
d0ac564cee fix --sort-dir not respected 2024-02-07 11:22:59 +01:00
53c3a55e07 change exit code 2024-02-07 11:16:53 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ settings_map = {
from os import makedirs from os import makedirs
def error(*args, exitcode=1, **kwargs): def error(*args, exitcode=2, **kwargs):
print("\033[31mError: \033[0m", *args, **kwargs) print("\033[31mError: \033[0m", *args, **kwargs)
exit(exitcode) exit(exitcode)

View File

@ -240,7 +240,7 @@ Image Sorter {fullversion}
parser = argparse.ArgumentParser("imgsort") parser = argparse.ArgumentParser("imgsort")
parser.add_argument("-c", "--config", action="store", help="name of the config file in ($IMGSORT_CONFIG_DIR > $XDG_CONFIG_HOME/imgsort > ~/.config/imgsort)", default=None) parser.add_argument("-c", "--config", action="store", help="name of the config file in ($IMGSORT_CONFIG_DIR > $XDG_CONFIG_HOME/imgsort > ~/.config/imgsort)", default=None)
parser.add_argument("-i", "--sort-dir", action="store", help="the directory where the folders from the config will be created") parser.add_argument("-i", "--sort-dir", action="store", help="directory in which the subdirectories from a config are created")
args = parser.parse_args() args = parser.parse_args()
wd = getcwd(); wd = getcwd();
@ -256,7 +256,7 @@ Image Sorter {fullversion}
if type(args.config) == str: if type(args.config) == str:
config = confman.load_config(args.config, args.sort_dir) config = confman.load_config(args.config, args.sort_dir)
else: else:
config = confman.present_config_selection() config = confman.present_config_selection(args.sort_dir)
sorter = Sorter(wd, config) sorter = Sorter(wd, config)
sorter.get_images() sorter.get_images()