With CLI and script config.
This commit is contained in:
parent
7543eedb23
commit
a0ac1252ae
2 changed files with 13 additions and 0 deletions
|
@ -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
10
src/pricehist/cli.py
Normal 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))
|
Loading…
Add table
Reference in a new issue