change input_path to input and fix click.command to cli.command

This commit is contained in:
Hirad 2025-07-07 12:37:39 +03:30
parent be9a605dac
commit cbcf934a89

View file

@ -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,