2023-08-03 16:10:30 +02:00
|
|
|
import datetime
|
|
|
|
|
|
2023-08-02 19:15:21 +02:00
|
|
|
import typer
|
|
|
|
|
|
2023-08-03 16:10:30 +02:00
|
|
|
from typing_extensions import Annotated
|
|
|
|
|
|
2023-08-02 19:26:58 +02:00
|
|
|
import camisatoshi_wordpress_reports.controllers as controllers
|
2023-08-02 19:15:21 +02:00
|
|
|
|
|
|
|
|
app = typer.Typer()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.command()
|
2023-08-02 19:49:36 +02:00
|
|
|
def check_health():
|
|
|
|
|
controllers.check_health()
|
2023-08-02 19:20:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.command()
|
2023-08-03 16:10:30 +02:00
|
|
|
def generate_um_report(
|
|
|
|
|
start_date: Annotated[datetime.datetime, typer.Option(prompt=True)],
|
|
|
|
|
end_date: Annotated[datetime.datetime, typer.Option(prompt=True)],
|
|
|
|
|
):
|
2023-08-03 09:29:11 +02:00
|
|
|
controllers.generate_um_report(start_date, end_date)
|