Files
minstrel/tools/demo-library/README.md
T
bvandeusenandClaude Opus 5.5 2bc6c60938
release / web (push) Successful in 1m16s
release / go (push) Successful in 1m47s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m1s
release / android (push) Successful in 4m31s
release / Build signed APK (push) Successful in 4m52s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 13s
release / Verify release artifacts (tag releases only) (push) Skipped
docs: README screenshots come from an invented demo library
Every artist, album, cover and song in the screenshots is generated by
tools/demo-library, so none of it is anyone's real music or art. The
folder builds the library (ffmpeg-synthesised audio, drawn covers),
gives a demo account two months of listening so every Home mix appears,
runs Minstrel and Postgres on a network with no internet, and retakes
the screenshots with Playwright. The README now shows Home, Now playing
and Home on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:24:15 -05:00

2.5 KiB

Demo library

An invented music library for screenshots and demos. Every artist, album and song title is made up, every cover is drawn by make_demo_library.py, and every track is synthesised by ffmpeg, so nothing in it belongs to anyone.

Build the library

Needs ffmpeg (with libmp3lame) and Pillow.

python3 tools/demo-library/make_demo_library.py /tmp/demo-music

About 24 albums and 208 tracks (about 350 MB). The script is seeded, so every run builds the same library. Pass --covers-only to redraw the covers and skip the audio.

Run a demo server

compose.yml starts Minstrel and Postgres on a network with no internet access, as Minstrel is meant to run.

DEMO_MUSIC=/tmp/demo-music docker compose -f tools/demo-library/compose.yml up -d
docker logs minstrel-demo-minstrel-1 2>&1 | grep setup_token

Retake the README screenshots

The captures run in the Playwright image on the demo network. That image carries the browsers but not the Python package, so install the matching package into a folder once (this step needs the internet):

mkdir -p /tmp/pwdeps /tmp/shots
docker run --rm -v /tmp/pwdeps:/deps mcr.microsoft.com/playwright/python:v1.49.1-noble \
  python3 -m pip install -q --break-system-packages --target /deps playwright==1.49.1
CAPTURE="docker run --rm --network minstrel-demo_demo -v $PWD/tools/demo-library:/tools:ro \
  -v /tmp/pwdeps:/deps:ro -v /tmp/shots:/shots -e PYTHONPATH=/deps --user $(id -u) -e HOME=/tmp \
  mcr.microsoft.com/playwright/python:v1.49.1-noble python3 /tools/capture_screenshots.py"

Then:

  1. Once the first scan has finished, take the sign-up shot and create the demo account: $CAPTURE register <setup_token>

  2. Give the account two months of listening:

    docker exec minstrel-demo-postgres-1 psql -U minstrel -d minstrel -At -F, -c \
      "SELECT t.id, t.genre, t.duration_ms, al.title FROM tracks t JOIN albums al ON al.id = t.album_id ORDER BY al.title, t.track_number" \
      | python3 tools/demo-library/seed_history.py alex \
      | docker exec -i minstrel-demo-postgres-1 psql -U minstrel -d minstrel -q -v ON_ERROR_STOP=1
    
  3. Restart Minstrel so it builds the account's mixes: docker restart minstrel-demo-minstrel-1, then wait half a minute.

  4. Capture the pages: $CAPTURE pages, then copy the PNGs you want from /tmp/shots into docs/screenshots/.

Leave out any page that shows the machine it ran on: the Admin overview lists the host's disk sizes.

When you're done: docker compose -f tools/demo-library/compose.yml down -v.