7c68aa3bd3
Puzzle 1 crossfades to the stitched map with a link to /museum-path; puzzle 2 is a touch-friendly drag-and-order challenge with PDF extract scripts for map and artifact assets.
42 lines
1.6 KiB
Bash
Executable File
42 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
SOURCE_DIR="${SOURCE_DIR:-/mnt/user/storage/Documents/Home School Projects/Egyptian Escape Room}"
|
|
PDF_SOURCE="${PDF_SOURCE:-$SOURCE_DIR/EgyptEscapeRoomPrintables.pdf}"
|
|
VIDEO_SOURCE="${VIDEO_SOURCE:-$SOURCE_DIR/Ted Escape Room 1-5.mp4}"
|
|
POP_SOURCE="${POP_SOURCE:-$SOURCE_DIR/celebration-pop.mp3}"
|
|
HORN_SOURCE="${HORN_SOURCE:-$SOURCE_DIR/celebration-horn.mp3}"
|
|
INCORRECT_SOURCE="${INCORRECT_SOURCE:-$SOURCE_DIR/incorrect.mp3}"
|
|
CONFIRM_SOURCE="${CONFIRM_SOURCE:-$SOURCE_DIR/unlock-confirm.mp3}"
|
|
DEST="${DEST:-/mnt/user/appdata/egyptian-escape-room/public}"
|
|
|
|
for f in "$PDF_SOURCE" "$VIDEO_SOURCE" "$POP_SOURCE" "$HORN_SOURCE" "$INCORRECT_SOURCE" "$CONFIRM_SOURCE"; do
|
|
if [[ ! -f "$f" ]]; then
|
|
echo "Media file not found: $f" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
mkdir -p "$DEST"
|
|
cp "$VIDEO_SOURCE" "$DEST/unlock.mp4"
|
|
cp "$POP_SOURCE" "$DEST/celebration-pop.mp3"
|
|
cp "$HORN_SOURCE" "$DEST/celebration-horn.mp3"
|
|
cp "$INCORRECT_SOURCE" "$DEST/incorrect.mp3"
|
|
cp "$CONFIRM_SOURCE" "$DEST/unlock-confirm.mp3"
|
|
python3 "$ROOT/scripts/extract-artifact-room-map.py" "$PDF_SOURCE" "$DEST/artifact-room-map.jpg"
|
|
python3 "$ROOT/scripts/extract-artifact-images.py" "$PDF_SOURCE" "$DEST/artifacts"
|
|
cat >"$DEST/config.json" <<'EOF'
|
|
{
|
|
"unlockVideoUrl": "/media/unlock.mp4",
|
|
"mapImageUrl": "/media/artifact-room-map.jpg",
|
|
"incorrectUrl": "/media/incorrect.mp3",
|
|
"unlockConfirmUrl": "/media/unlock-confirm.mp3",
|
|
"celebrationPopUrl": "/media/celebration-pop.mp3",
|
|
"celebrationHornUrl": "/media/celebration-horn.mp3",
|
|
"celebrationHornDurationMs": 2000
|
|
}
|
|
EOF
|
|
|
|
echo "Copied media to $DEST/"
|