From 64dbf9e9813ec2fdf5da10c79b96f0655d68efcb Mon Sep 17 00:00:00 2001 From: Mizaki Date: Sat, 4 May 2024 21:14:00 +0100 Subject: [PATCH] Add -t to --type-read and duplicate read styles to modify styles on the CLI if modify if empty --- comictaggerlib/ctsettings/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comictaggerlib/ctsettings/commandline.py b/comictaggerlib/ctsettings/commandline.py index 1a4554a..3884718 100644 --- a/comictaggerlib/ctsettings/commandline.py +++ b/comictaggerlib/ctsettings/commandline.py @@ -165,10 +165,11 @@ def register_runtime(parser: settngs.Manager) -> None: metavar=f"{{{','.join(metadata_styles).upper()}}}", default=[], type=metadata_type, - help="""Specify the type of tags to write.\nUse commas for multiple types.\nSee --list-plugins for the available types.\n\n""", + help="""Specify the type of tags to write.\nUse commas for multiple types.\nRead types will be used if unspecified\nSee --list-plugins for the available types.\n\n""", file=False, ) parser.add_setting( + "-t", "--type-read", metavar=f"{{{','.join(metadata_styles).upper()}}}", default=[], @@ -290,6 +291,9 @@ def validate_commandline_settings(config: settngs.Config[ct_ns], parser: settngs if config[0].Runtime_Options__json and config[0].Runtime_Options__interactive: config[0].Runtime_Options__json = False + if config[0].Runtime_Options__type_read and not config[0].Runtime_Options__type_modify: + config[0].Runtime_Options__type_modify = config[0].Runtime_Options__type_read + if ( config[0].Commands__command not in (Action.save_config, Action.list_plugins) and config[0].Runtime_Options__no_gui