# 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 ` 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: `docker compose -f tools/demo-library/compose.yml down -v`.