chore: archive diagnostics and project documentation
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/zsh
|
||||
|
||||
set -u
|
||||
|
||||
SCRIPT_DIR="${0:A:h}"
|
||||
PLAYER="$SCRIPT_DIR/play_prompt_opus.py"
|
||||
|
||||
if [[ $# -gt 0 ]]; then
|
||||
PROMPT_FILE="$1"
|
||||
else
|
||||
PROMPT_FILE="$(osascript <<'APPLESCRIPT'
|
||||
try
|
||||
POSIX path of (choose file with prompt "Choose a TQ_CatN prompt Opus file")
|
||||
on error number -128
|
||||
return ""
|
||||
end try
|
||||
APPLESCRIPT
|
||||
)"
|
||||
fi
|
||||
|
||||
if [[ -z "$PROMPT_FILE" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
python3 "$PLAYER" "$PROMPT_FILE"
|
||||
RESULT=$?
|
||||
if [[ $RESULT -ne 0 ]]; then
|
||||
echo
|
||||
echo "Playback failed. Install FFmpeg with: brew install ffmpeg"
|
||||
echo "Press Enter to close."
|
||||
read -r
|
||||
fi
|
||||
exit $RESULT
|
||||
Reference in New Issue
Block a user