Skip to content

Commit

Permalink
✨ Add cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
renardguill committed Sep 28, 2022
1 parent 9cf2f0e commit 841726d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blablamower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ def start(file_path):
print(mower)


if __name__ == "__main__":
def main():
if len(sys.argv) == 1:
print("You must provide an input file !")
else:
start(sys.argv[1])


if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ black = {version = "^22.8.0", allow-prereleases = true}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
blablamower = "blablamower.__main__:main"

0 comments on commit 841726d

Please sign in to comment.