Find free public-domain opera sheet music online.
The public site is migrating from Next.js to Zola, with a small Rust exporter that turns the version-controlled SQLite catalogue into static Zola content.
- Zola
- Rust
- Optional: a MariaDB/MySQL database when refreshing
data/catalogue.sqlite
The public catalogue is stored in SQLite so it can be version controlled:
data/catalogue.sqlite
data/catalogue.sql
Use catalogue.sqlite for the build tools. Use catalogue.sql as the reviewable text snapshot.
The exporter accepts either a single connection URL:
DB_CONNECTION_URL=mysql://user:password@host:port/database
or the split variables used by the legacy app:
DB_URL=localhost
DB_PORT=3306
DB_USER=user
DB_PASS=password
DB_NAME=database
Run this when the MariaDB catalogue is the source you want to snapshot:
cd tools/catalog-exporter
cargo run --release --bin mariadb_to_sqliteThis writes:
data/catalogue.sqlitedata/catalogue.sql
Schema migrations live in data/migrations and are applied in filename order:
cd tools/catalog-exporter
cargo run --release --bin migrate_sqliteUse migrations for schema changes such as adding tables, columns, indexes, or constraints. Normal catalogue edits can be made directly in SQLite and then committed with the updated SQL snapshot.
cd tools/catalog-exporter
cargo run --release --bin catalog-exporterThe exporter reads data/catalogue.sqlite by default and writes generated pages and data to:
content/composers/*content/operas/*content/pieces/*data/*.jsonstatic/search-index.json
zola servezola buildThe static site is written to dist/.
Legacy Next.js files are still present during the migration, but the Zola path is now the intended public-site build. See ZOLA_MIGRATION.md for more detail.