birdcage/tui/scripts/take_screenshots.py
Ryan Malloy a249c98208 Implement Track mode (Phase 6) with rotctld server
TUI-compatible Hamlib rotctld TCP server that works with the
existing SerialBridge/DemoDevice interface. F2 Control's Track
tab now starts/stops a real TCP server on the configured port.
Status callbacks report connection state, move count, and command
rate back to the TrackingPanel via thread-safe call_from_thread.

Includes 7 pilot tests exercising the full protocol path through
asyncio TCP clients against the DemoDevice.
2026-02-15 15:52:49 -07:00

35 lines
844 B
Python

"""Take screenshots of all TUI screens in demo mode for documentation."""
import asyncio
from birdcage_tui.app import BirdcageApp
SCREENS = {
"f1": "dashboard",
"f2": "control",
"f3": "signal",
"f4": "system",
}
OUT_DIR = "/home/rpm/claude/ham/satellite/winegard-travler/site/public/screenshots"
async def main():
for key, name in SCREENS.items():
app = BirdcageApp()
app.demo_mode = True
async with app.run_test(size=(120, 40)) as pilot:
await pilot.pause()
await pilot.press(key)
await pilot.pause()
# Let workers populate data.
await asyncio.sleep(1.5)
path = f"{OUT_DIR}/tui-{name}.svg"
app.save_screenshot(path)
print(f"Saved {path}")
asyncio.run(main())