From 9b57332c89efe9fd47e582b9bbd47e1d77a81bc9 Mon Sep 17 00:00:00 2001 From: Tim Grelka Date: Sun, 15 Feb 2026 17:06:15 +0100 Subject: [PATCH] feat: add render options --- main.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 534b4ae..a53294a 100644 --- a/main.py +++ b/main.py @@ -19,17 +19,26 @@ def main( Edition.ea, Edition.nea, ], - source: Annotated[str | None, typer.Option(help="Content source directory.")] = None, - destination: Annotated[str | None, typer.Option(help="Destination directory to build to.")] = None, + input: Annotated[str | None, typer.Option("--input", "-i", help="Content source directory.")] = None, + output: Annotated[str | None, typer.Option("--output", "-o", help="Destination directory to build to.")] = None, + render_editions: Annotated[bool, typer.Option(help="Skip building editions.")] = True, + render_solutions: Annotated[bool, typer.Option(help="Skip building solutions.")] = True, ) -> None: - conf = config.Config(content_path=source, build_path=destination) + conf = config.Config(content_path=input, build_path=output) bd = build.Build(conf) # Build surrounding website bd.build_website() - # Build individual editions - for e in edition: - bd.build_edition(e) + + if render_editions: + # Build individual editions + for e in edition: + bd.build_edition(e) + + if render_solutions: + # Build solution pages + bd.build_solutions() + # Copy assets to build folder bd.build_assets()