Files
minstrel/tools/demo-library/README.md
T
bvandeusenandClaude Opus 5.5 1efc65ee10 docs: retake the Home screenshots now a featured guest is a credit, not a mix
The demo library's "Low Tide Choir feat. Ruby Calloway" track no longer
makes a "Songs like Low Tide Choir feat. Ruby Calloway" mix on Home. The
demo README's teardown line now sets DEMO_MUSIC, which compose needs even to
stop the stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:30:23 -05:00

68 lines
2.6 KiB
Markdown

# 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.
```bash
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.
```bash
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):
```bash
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:
```bash
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 (the compose file needs `DEMO_MUSIC` set even to stop):
`DEMO_MUSIC=/tmp/demo-music docker compose -f tools/demo-library/compose.yml down -v`.