From cbcf934a8912338f76d157c97b08d13e5801358a Mon Sep 17 00:00:00 2001 From: Hirad Date: Mon, 7 Jul 2025 12:37:39 +0330 Subject: [PATCH] change input_path to input and fix click.command to cli.command --- src/srtify/cli/commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srtify/cli/commands.py b/src/srtify/cli/commands.py index 9aa4c51..457e85e 100644 --- a/src/srtify/cli/commands.py +++ b/src/srtify/cli/commands.py @@ -17,8 +17,8 @@ def cli(ctx): cli_handler.handle_main_menu() -@click.command() -@click.argument('input_path', type=click.Path(exists=True, path_type=Path)) +@cli.command() +@click.option('--input', '-i', type=click.Path(path_type=Path)) @click.option('--output', '-o', type=click.Path(path_type=Path), help='Output directory (default: from settings)') @click.option('--language', '-l', help='Target language (default: from settings)') @@ -27,7 +27,7 @@ def cli(ctx): @click.option('--custom-prompt', help='Use a custom prompt') @click.option('--batch-size', '-b', type=int, help='Batch size for translation') @click.option('-quick', '-q', is_flag=True, help='Quick translation with default prompt') -def translate(input_path, output, language, file, prompt, custom_prompt, batch_size, quick): +def translate(input, output, language, file, prompt, custom_prompt, batch_size, quick): """ Translate SRT files from INPUT_PATH """ settings = SettingsManager() prompts = PromptsManager() @@ -35,7 +35,7 @@ def translate(input_path, output, language, file, prompt, custom_prompt, batch_s app = TranslatorApp(settings, prompts) options = { - 'input_path': input_path, + 'input_path': input, 'output_path': output, 'language': language, 'file': file,