Bot proposal: vrana_bot – adding data from the Czech National Bibliography to Czech releases

Hi all,

I’d like to run vrana_bot on a second task: adding data from the Czech National Bibliography to releases on MusicBrainz, and adding Czech releases that are missing. The National Library of the Czech Republic (NK ČR) publishes its catalogues as open data under CC0 in MARC21. The national bibliography contains 23,401 sound recordings of music, mostly CDs, cassettes and vinyl from 1990 on.

What the bot would do

Every edit is chosen by me on a review page. Nothing is submitted without my decision for that row. For each library record the tool proposes:

Proposal Count
Add a barcode to a release paired by catalogue number or title 617
Add the catalogue number to an existing label of the release 539
Add the release event (year and country of publication) to a release without one 485
Set the format (CD, Cassette, Vinyl) on mediums without one 533
Add the label and catalogue number to a release without labels 469
Add a missing release, in its existing release group or a new one, with tracklist, label, catalogue number, barcode, event, language and script up to 5,466

About 15,400 library records aren’t on MusicBrainz at all. Only the ones where everything below checks out can be processed. The rest I’d add manually; the tool can prefill the release editor (release editor seeding) for those.

Pairing

  • Releases:
    • Barcode match: paired by barcode (1,364 records).
    • Catalogue number match: paired by catalogue number, but only with an agreeing label or title (1,580 records).
    • Title and artist match: paired by title and artist (2,183 records).
    • Different format: if the matched release has another format (typically a digital release reusing the CD’s catalogue number), it’s treated as “release group found, this release missing”, never as the same release.
    • Manual choice: I can pair any record by hand from a table of candidate releases.
  • Artists: by the library’s authority ID through Wikidata (P691 → P434), otherwise by an exact name.
    • The artist credit of a new release comes from the statement of responsibility on the record, and every name in it must be a paired artist.
    • Classical releases whose tracklist is given only as text, partial tracklists, and multi-disc sets without disc structure are skipped.
  • Labels: by name or alias. Where several labels share a name, the one on the other releases of the same release group or from the country of publication is used.

Safeguards

  • Live re-check: before each edit, the release is loaded from musicbrainz.org and the edit is skipped if the field changed meanwhile. A new release is skipped if a release with its barcode exists.
  • No removals: release events are only added. Existing events, labels and catalogue numbers are never removed or changed.
  • Barcodes: only valid GTINs, and never on releases marked “no barcode”.
  • Limits: at most one request per 1.1 s, 1,000 edits a day and [2,000 open edits].

Edit notes

Every edit links the library record. Two examples:

From the Czech National Bibliography (National Library of the Czech Republic, data under CC0): https://aleph.nkp.cz/F/?func=direct&doc_number=003768853&local_base=CNB
Library record: Marathón / Olympic; Supraphon, 2026; 1 cd audio (75:17) ; 12 cm; catalogue number SU 6993-2 (Supraphon); catalogue number 1 13 2119 (Supraphon); barcode 099925699321
Adding the barcode 099925699321 as recorded by the library.
The release was paired by its title and artist.
Submitted with https://github.com/vrana/nkp-musicbrainz after a manual review of the proposal.

From the Czech National Bibliography (National Library of the Czech Republic, data under CC0): https://aleph.nkp.cz/F/?func=direct&doc_number=003768599&local_base=CNB
Library record: Marathón / Olympic; Supraphon, 2026; 1 gramofonová deska ; 30 cm; catalogue number SU 6993-1 (Supraphon); catalogue number 1 13 2119 (Supraphon); barcode 099925699314
This release is missing on MusicBrainz, its release group has only another format: https://musicbrainz.org/release/f5b06060-f87f-4fef-870b-353b3ca69997
Submitted with https://github.com/vrana/nkp-musicbrainz after a manual review of the proposal.

When a release needs changes before it can be added, for example a title as printed on the cover, an artist credit, A/B side numbering or a split into mediums, I don’t let the bot submit it. Instead I use “prefill at MusicBrainz” on the review page, which opens the release editor prefilled with the same data and the same edit note. I fix what’s needed and submit the release from my own account, vrana, adding a line to the note that says what I changed.

Code: https://github.com/vrana/nkp-musicbrainz, also linked from vrana_bot.

Test edits: https://musicbrainz.org/user/vrana_bot/edits

Feedback on the pairing and the edit notes is very welcome.

1 Like

Since there are no objections, I’ll slowly start with the safest additions.