Skip to content

Commit

Permalink
add help behavior (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncherian authored Jan 10, 2025
1 parent d986025 commit f30824f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
14 changes: 12 additions & 2 deletions skelly_synchronize/__main__.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit f30824f

Please sign in to comment.