diff --git a/pyproject.toml b/pyproject.toml index 641247d..f1d7515 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,3 +16,6 @@ pytest = "^6.2.2" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +pricehist = "pricehist.cli:cli" diff --git a/src/pricehist/cli.py b/src/pricehist/cli.py new file mode 100644 index 0000000..8dc4775 --- /dev/null +++ b/src/pricehist/cli.py @@ -0,0 +1,10 @@ +import sys + +from pricehist.location import greet + +def cli(args=None): + """Process command line arguments.""" + if not args: + args = sys.argv[1:] + tz = args[0] + print(greet(tz))