change input_path to input and fix click.command to cli.command
This commit is contained in:
parent
be9a605dac
commit
cbcf934a89
1 changed files with 4 additions and 4 deletions
|
@ -17,8 +17,8 @@ def cli(ctx):
|
||||||
cli_handler.handle_main_menu()
|
cli_handler.handle_main_menu()
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@cli.command()
|
||||||
@click.argument('input_path', type=click.Path(exists=True, path_type=Path))
|
@click.option('--input', '-i', type=click.Path(path_type=Path))
|
||||||
@click.option('--output', '-o', type=click.Path(path_type=Path),
|
@click.option('--output', '-o', type=click.Path(path_type=Path),
|
||||||
help='Output directory (default: from settings)')
|
help='Output directory (default: from settings)')
|
||||||
@click.option('--language', '-l', help='Target language (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('--custom-prompt', help='Use a custom prompt')
|
||||||
@click.option('--batch-size', '-b', type=int, help='Batch size for translation')
|
@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')
|
@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 """
|
""" Translate SRT files from INPUT_PATH """
|
||||||
settings = SettingsManager()
|
settings = SettingsManager()
|
||||||
prompts = PromptsManager()
|
prompts = PromptsManager()
|
||||||
|
@ -35,7 +35,7 @@ def translate(input_path, output, language, file, prompt, custom_prompt, batch_s
|
||||||
app = TranslatorApp(settings, prompts)
|
app = TranslatorApp(settings, prompts)
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
'input_path': input_path,
|
'input_path': input,
|
||||||
'output_path': output,
|
'output_path': output,
|
||||||
'language': language,
|
'language': language,
|
||||||
'file': file,
|
'file': file,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue