Make travel date required argument

This commit is contained in:
Marty Oehme 2025-08-12 12:25:54 +02:00
parent 7390d1febd
commit 0f3178d9bf
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -4,7 +4,7 @@ from dataclasses import dataclass
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from time import sleep from time import sleep
from typing import Any from typing import Annotated, Any
import requests import requests
import typer import typer
@ -278,13 +278,13 @@ app = typer.Typer()
@app.command() @app.command()
def main( def main(
travel_date: Annotated[str, typer.Argument(help="Travel day to search from. (YYYY-MM-DD)")],
start_station: int = typer.Option( start_station: int = typer.Option(
START_STATION, help="Departure station number. (default: Berlin Hbf)" START_STATION, help="Departure station number. (default: Berlin Hbf)"
), ),
end_station: int = typer.Option( end_station: int = typer.Option(
END_STATION, help="Destination station number. (default: Paris Est)" END_STATION, help="Destination station number. (default: Paris Est)"
), ),
travel_date: str = typer.Option(help="Travel day to search from. (YYYY-MM-DD)"),
notification_channel: str = typer.Option( notification_channel: str = typer.Option(
NOTIFICATION_CHANNEL, help="ntfy channel to inform user on." NOTIFICATION_CHANNEL, help="ntfy channel to inform user on."
), ),