diff --git a/pyproject.toml b/pyproject.toml index 0fc68a9..dab0a4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,11 +3,21 @@ name = "nj-api" version = "0.1.0" description = "Add your description here" readme = "README.md" +authors = [ + { name = "Marty Oehme", email = "contact@martyoeh.me" } +] requires-python = ">=3.13" dependencies = [ "requests>=2.32.4", "typer>=0.16.0", ] +[project.scripts] +nightjet = "nj_api:main" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + [tool.pyright] typeCheckingMode = "basic" diff --git a/src/nj_api/__init__.py b/src/nj_api/__init__.py new file mode 100644 index 0000000..8b89904 --- /dev/null +++ b/src/nj_api/__init__.py @@ -0,0 +1,5 @@ +from nj_api import main as cli + + +def main() -> None: + cli.app() diff --git a/main.py b/src/nj_api/main.py similarity index 99% rename from main.py rename to src/nj_api/main.py index 6cbd855..0a4c208 100644 --- a/main.py +++ b/src/nj_api/main.py @@ -278,7 +278,9 @@ app = typer.Typer() @app.command() def main( - travel_date: Annotated[str, typer.Argument(help="Travel day to search from. (YYYY-MM-DD)")], + travel_date: Annotated[ + str, typer.Argument(help="Travel day to search from. (YYYY-MM-DD)") + ], start_station: int = typer.Option( START_STATION, help="Departure station number. (default: Berlin Hbf)" ), diff --git a/uv.lock b/uv.lock index e929183..f9e453b 100644 --- a/uv.lock +++ b/uv.lock @@ -96,7 +96,7 @@ wheels = [ [[package]] name = "nj-api" version = "0.1.0" -source = { virtual = "." } +source = { editable = "." } dependencies = [ { name = "requests" }, { name = "typer" },