Skip to content

tools / gen_script_cards.py

Path: tools/gen_script_cards.py
Lane: tools
Executable: yes

Purpose

Generate per-script documentation pages ("Script Cards") for wine_platform.

Usage: python tools/gen_script_cards.py --root . --out docs/scripts

Default scan roots: apps/, workers/, shared/, tools/

Override scan roots: python tools/gen_script_cards.py --root . --out docs/scripts --scan-root apps --scan-root workers

Entry points

  • __main__ guard detected

Key symbols

Classes

  • ScriptCard

Functions

  • detect_lane(relpath)
  • iter_py_files(root, scan_roots)
  • iter_scan_roots(root, scan_roots)
  • main()
  • md_escape(s)
  • parse_script(p, root)
  • render_card(card)
  • should_exclude_part(part)
  • should_exclude_path(path)

Configuration & environment

  • (no env vars detected by regex)

Dependencies (imports)

  • __future__
  • argparse
  • ast
  • dataclasses
  • pathlib
  • re
  • typing

Operational notes (fill in)

  • Headless/interactive:
  • Systemd unit (if any):
  • Schedules/triggers:
  • Debug artifacts:
  • Failure modes: