Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
2.4 kB · 58 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859#!/bin/sh# juke-wizard/bin/jukewizard — build (cached) + launch JukeWizard.## JukeWizard is the MASTER JUKE: it ALWAYS loads the whole /pop library so# every track is visible. Open it with no args to browse, or pass a specific# track to jump straight to it — the full library still loads underneath.# Each track shows its cover art, per-service listen links (Spotify/Apple/# YouTube/DistroKid), and any reels/videos made for it (from the lane's out/).# The sidebar sort menu reorders by newest-rendered, rating, title, etc.## usage:# juke-wizard/bin/jukewizard # browse the whole /pop library# juke-wizard/bin/jukewizard <file.mp3> # load library + select/play that track# juke-wizard/bin/jukewizard --queue <a.mp3> <b.mp3> # focused ordered playlist; play a# juke-wizard/bin/jukewizard <folder | playlist> # load library + add these too# juke-wizard/bin/jukewizard ... --watch <dir> # auto-pop new renders## Runs from anywhere; resolves the package from its own location.set -eHERE="$(cd "$(dirname "$0")" && pwd)"WIZ="$HERE/.."REPO="$(cd "$WIZ/.." && pwd)"swift build -c release --package-path "$WIZ" 2>&1 | grep -v '^$' | tail -2 || trueBIN="$WIZ/.build/release/JukeWizard"LIB="$REPO/pop/out/pop-library.json"node "$REPO/pop/bin/pop-library.mjs" >/dev/null 2>&1 || true # refresh the index# Focused queue mode: use only the following loose files/folders/playlists,# preserving their command-line order. This makes `--queue a.mp3 b.mp3` a# real two-track listening session instead of burying those tracks inside the# master /pop library. Select + autoplay the first supplied audio file.if [ "${1:-}" = "--queue" ]; then shift if [ "$#" -eq 0 ]; then echo "usage: jukewizard --queue <file | folder | playlist> [...]" >&2 exit 2 fi FIRST="$1" case "$FIRST" in /*) SEL="$FIRST";; *) SEL="$(pwd)/$FIRST";; esac exec "$BIN" "$@" --select "$SEL"fi# No args → just the master library.if [ "$#" -eq 0 ]; then exec "$BIN" "$LIB"fi# A specific audio file → load the master library AND select/play it# (absolutized so it matches the library entry; added to the queue if it's a# fresh draft not in the index yet).if [ -f "$1" ]; then case "$1" in /*) SEL="$1";; *) SEL="$(pwd)/$1";; esac exec "$BIN" "$LIB" "$@" --select "$SEL"fi# A folder / playlist / flags → load the master library and add them too.exec "$BIN" "$LIB" "$@"