From 988f0be369adfb162fd0b15284b1bc9dcee3595f Mon Sep 17 00:00:00 2001 From: John McCardle Date: Sat, 18 Apr 2026 23:04:22 -0400 Subject: [PATCH] Add header image capture script for blog post 0033 Headless screenshot tool for the audio_synth_demo SFXR scene. Refs Kanboard #209 / #345. Co-Authored-By: Claude Sonnet 4.6 --- tools/capture_audio_synth_header.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/capture_audio_synth_header.py diff --git a/tools/capture_audio_synth_header.py b/tools/capture_audio_synth_header.py new file mode 100644 index 0000000..9f71584 --- /dev/null +++ b/tools/capture_audio_synth_header.py @@ -0,0 +1,16 @@ +import mcrfpy +from mcrfpy import automation +import runpy, sys, pathlib + +OUT = sys.argv[1] if len(sys.argv) > 1 else "image00.png" + +demo_path = (pathlib.Path(__file__).resolve().parent.parent / + "tests" / "demo" / "audio_synth_demo.py") +runpy.run_path(str(demo_path), run_name="__demo__") + +def shot(timer, runtime): + automation.screenshot(OUT) + print(f"Wrote {OUT}") + sys.exit(0) + +mcrfpy.Timer("header_shot", shot, 150)