Load layout config from file, auto-generate, or use default.
(args)
| 2010 | |
| 2011 | |
| 2012 | def load_layout(args) -> Dict[str, List[str]]: |
| 2013 | """Load layout config from file, auto-generate, or use default.""" |
| 2014 | if args.layout_file: |
| 2015 | path = Path(args.layout_file) |
| 2016 | if not path.exists(): |
| 2017 | raise SystemExit(f"Layout file not found: {path}") |
| 2018 | return json.loads(path.read_text(encoding="utf-8")) |
| 2019 | if args.auto_layout: |
| 2020 | # Will be filled in after analysis |
| 2021 | return None # type: ignore |
| 2022 | return DEFAULT_LAYOUT |
| 2023 | |
| 2024 | |
| 2025 | def main() -> int: |