diff --git a/pyproject.toml b/pyproject.toml index afd0f3d..74a6df0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,4 +69,4 @@ push = true "skelly_synchronize/__init__.py" = ["{version}"] [project.scripts] -skelly_synchronize = "skelly_synchronize.__main__:main" +skelly_synchronize = "skelly_synchronize.__main__:run" diff --git a/skelly_synchronize/__main__.py b/skelly_synchronize/__main__.py index 1bdbdf6..4ac62e4 100644 --- a/skelly_synchronize/__main__.py +++ b/skelly_synchronize/__main__.py @@ -1,12 +1,22 @@ # __main__.py import sys from pathlib import Path +import argparse base_package_path = Path(__file__).parent.parent print(f"adding base_package_path: {base_package_path} : to sys.path") sys.path.insert(0, str(base_package_path)) # add parent directory to sys.path -from gui.skelly_synchronize_gui import main +def parse_args(): + parser = argparse.ArgumentParser(description="Skelly Synchronize") + return parser.parse_args() -if __name__ == "__main__": +def run(): + parse_args() + + from gui.skelly_synchronize_gui import main main() + + +if __name__ == "__main__": + run()