Skip to content

About

Website for MusicBrainz Picard

Topics

Resources

Code of conduct

Security policy

Stars

26 stars

Watchers

6 watching

Forks

Repository files navigation

MusicBrainz Picard's Website

Website for MusicBrainz Picard.

Please report issues here: https://tickets.musicbrainz.org/browse/PW

Docker image is available at: https://hub.docker.com/r/metabrainz/picard-website

Translations: https://translations.metabrainz.org/projects/picard/website/

Development Scripts

Testing and Running

./test.sh - Run tests and start the development server. This script:

  • Checks for website/config.py (required)
  • Installs Python dependencies with uv
  • Installs npm dependencies
  • Builds static assets
  • Runs pytest tests
  • Starts the local development server

Note: To serve plugin data locally, run uv run python plugins-generate.py separately (requires network access to download from picard-plugins repository). Without it, plugin pages will return 503.

Preparing a Release

uv run python release-helper.py <tag> - Generate a ready-to-paste PICARD_VERSIONS channel block for a new Picard release. When a new version is published on GitHub, this saves copying hashes and sizes by hand. It queries the metabrainz/picard GitHub release API for the given tag, matches each published asset to the corresponding config field, and prints the channel dict to stdout. Sizes come from the GitHub API (exact byte sizes); MD5 hashes are read from the small <file>.md5 sidecars that the release mirroring step uploads next to the binaries on FILESERVER_URL. This means no binaries are downloaded — just the GitHub metadata and a handful of tiny .md5 files. (The config stores MD5, while GitHub only publishes SHA256SUMS, so the mirrored MD5 sidecars are the cheap source of truth.) Progress is printed to stderr, so you can redirect just the block (e.g. > block.txt).

Run it after the release has been mirrored to the fileserver (the .md5 sidecars must exist). FILESERVER_URL is read from the site config, like verify-downloads.py.

  • uv run python release-helper.py 3.0.1 - Produce the 'stable' block for tag 3.0.1.
  • uv run python release-helper.py 3.0.0rc4 --channel beta - Label the block for another channel.
  • uv run python release-helper.py 3.0.1 --repo metabrainz/picard - Use a different repo (default is metabrainz/picard).
  • uv run python release-helper.py 3.0.1 --fileserver-url <url> - Override FILESERVER_URL (default: read from the site config).
  • uv run python release-helper.py 3.0.1 --download - Compute MD5 by downloading the GitHub binaries instead of reading the fileserver .md5 sidecars. Use when running before the release is mirrored.
  • uv run python release-helper.py 3.0.1 --links-only - Fill sizes from the API and skip hashing (hashes left blank; useful for a quick preview without touching the fileserver).

If a .md5 sidecar is missing (e.g. the release isn't mirrored yet), that hash is left blank with a MISS note on stderr rather than failing. The printed version tuple and changelog URL are left as TODO placeholders for you to fill in. Assets a release doesn't ship (e.g. older macOS builds, source zip) are left blank. After pasting the block into website/default_config.py, run verify-downloads.py to confirm the mirrored files on the fileserver match.

Release Verification

uv run python verify-downloads.py - Verify the download links and MD5 hashes declared in the site config (PICARD_VERSIONS / FILESERVER_URL). It reconstructs every download URL the downloads page renders, checks each is reachable, downloads it and compares the MD5 against the configured hash, and validates the per-channel download/changelog links. Useful after editing website/default_config.py for a release. Exits non-zero if any check fails (CI-friendly).

  • uv run python verify-downloads.py beta - Verify a single channel (stable, beta, or dev).
  • uv run python verify-downloads.py --links-only - Only check that URLs are reachable; skip downloading and hashing.

Translation Management

npm run extract_strings - Extract translatable strings from Python source files to website/frontend/messages.pot

npm run resync_po_files_from_pot - Update translation files (.po) from the messages.pot template

npm run translate - Compile translation files (.po) to binary format (.mo) for use by the application

Build Commands

npm run build - Build all static assets (CSS and translations). Runs: clean → styles → translate

npm run clean - Remove generated CSS files

npm run styles - Compile LESS stylesheets to CSS

About

Website for MusicBrainz Picard

Topics

Resources

Code of conduct

Security policy

Stars

26 stars

Watchers

6 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages