Files
minstrel/tools/demo-library
bvandeusenandClaude Opus 5.5 e1f270362d
release / go (push) Successful in 2m7s
release / web (push) Successful in 1m25s
release / govulncheck (push) Successful in 21s
release / integration (push) Successful in 4m30s
release / android (push) Successful in 4m39s
release / Build signed APK (push) Successful in 5m10s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 29s
release / Verify release artifacts (tag releases only) (push) Skipped
chore(release): everything that ships points at GitHub and GHCR (#7897)
- Module path: github.com/Fabled-Sword/minstrel, in go.mod, every
  import and the Dockerfile's version ldflags.
- buildinfo.ProjectURL, the contact outside services see in Minstrel's
  User-Agent: https://github.com/Fabled-Sword/minstrel.
- README's compose example pulls ghcr.io/fabled-sword/minstrel:latest.
- docs/security.md sends problem reports to the GitHub issues.
- The demo-library stack builds Minstrel from the checkout, since :dev
  is not published to GHCR.
- hygiene.go's same-site example uses example.com names.

The workbench CI (.gitea/, ci/, export-ignored) still builds and
publishes :dev to the private registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:28:16 -05:00
..

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 (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.