diff --git a/pyproject.toml b/pyproject.toml index ecc7743..a631f55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ dependencies = [ ] [project.scripts] -ocr-screenshot = "tooling.cli:main" +ocr-screenshot = "tooling.cli:cli_main" [build-system] requires = ["hatchling"] diff --git a/src/tooling/cli.py b/src/tooling/cli.py index 679a439..cde27d1 100644 --- a/src/tooling/cli.py +++ b/src/tooling/cli.py @@ -32,23 +32,19 @@ console = Console() @app.command() def main( lang: str = typer.Option( - "eng", - "--lang", + default="eng", help="Language code for OCR (default: eng)" ), save_image: bool = typer.Option( - False, - "--save-image", + default=False, help="Save the screenshot image instead of deleting it" ), output_dir: Path = typer.Option( - Path.home() / "Desktop", - "--output-dir", + default=Path.home() / "Desktop", help="Directory to save screenshot if --save-image is used (default: ~/Desktop)" ), verbose: bool = typer.Option( - False, - "--verbose", "-v", + default=False, help="Show verbose output" ) ): @@ -145,5 +141,10 @@ def main( pass # Ignore cleanup errors +def cli_main(): + """Entry point for the CLI script.""" + app() + + if __name__ == "__main__": app() \ No newline at end of file