Files
museion/spike/apexhtml/run.sh
T
AlexKucera 7afd1a00e9 spike(apexhtml): apex → HTML → WKWebView reading surface (#74)
Throwaway spike proving the #73 pivot chain:
- sentinel pre-pass (<!--S:N-->) → apex → regex stamp to data-source-line
- one WKWebView reloaded in place (no per-document remount — that was
  the dominant switch cost, not apex)
- early HTML handoff: stdout EOF = conversion done, apex teardown reaped
  async (PERF-3k end-to-end 34 ms, was 82)
- images via --embed-images base64: loadHTMLString fast path, no file
  access, no vault writes (loadFileURL path cost 4× paint)
- ⌘-click links, click→source-line map, scroll→top-line map
- self-check --check, headless --pipeline (0 mis-stamps corpus-wide)
2026-10-06 16:25:09 +02:00

25 lines
1003 B
Bash
Executable File

#!/bin/zsh
# ponytail: wrap the SPM binary in a minimal .app — WKWebView needs a bundle to behave.
set -e
cd "$(dirname "$0")"
swift build 2>&1 | tail -1
APP=.build/ApexHTMLSpike.app
rm -rf "$APP" && mkdir -p "$APP/Contents/MacOS"
cp .build/debug/ApexHTMLSpike "$APP/Contents/MacOS/"
cat > "$APP/Contents/Info.plist" <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key><string>ApexHTMLSpike</string>
<key>CFBundleIdentifier</key><string>de.babylondreams.museion.spike-apexhtml</string>
<key>CFBundleName</key><string>Spike — apex HTML reading</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>LSMinimumSystemVersion</key><string>26.0</string>
<key>NSHighResolutionCapable</key><true/>
</dict>
</plist>
PLIST
echo "built: $APP"
exec "$APP/Contents/MacOS/ApexHTMLSpike" "${@:-../prose/kitchen-sink.md}"