Update calendar generation and data normalization; add read check command

- Add config file support for calendar colors and logos in generate_calendar
- Extend normalization mappings in normalization.toml for fields and teams
- Add 'read check' command to summarize game and field data from input files
- Fix normalization to correctly handle visitor field and value lookups
- Update launch configurations for new data and options
This commit is contained in:
2025-08-26 16:42:19 -05:00
parent c1628f5dfe
commit 2a521e9016
6 changed files with 112 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
import typer
from rich.console import Console
from typing import Annotated, List
from typing import Annotated, List, Optional
from pathlib import Path
from ...utils.sportspress import validate_keys
from ...utils.normalize import normalize_header_key, load_config
@@ -15,13 +15,14 @@ app = typer.Typer()
@app.command(name="calendar")
def generate_calendar_app(
input_file: Annotated[List[Path], typer.Argument(..., help="Path(s) to the CSV file")],
config_file: Annotated[Optional[typer.FileText], typer.Option(..., "--config", "-c", help="Path to a config file")]=None
):
# Read CSV data
data = read_and_normalize_csv_or_xlsx(input_file)
data = personalize_data_for_team(data, "Hounds")
# data = parse_datetime(data)
generate_calendar(data)
generate_calendar(data, config_file)
pass
@app.command(name="calendar-config")