With CLI and script config.

This commit is contained in:
Chris Berkhout 2021-02-28 17:33:01 +01:00
parent 7543eedb23
commit a0ac1252ae
2 changed files with 13 additions and 0 deletions

View file

@ -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"

10
src/pricehist/cli.py Normal file
View file

@ -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))