https://github.com/jwillikers/driverbrainz
Automates time-consuming tasks contributing metadata to BookBrainz and MusicBrainz
https://github.com/jwillikers/driverbrainz
bookbrainz musicbrainz nix selenium
Last synced: about 2 months ago
JSON representation
Automates time-consuming tasks contributing metadata to BookBrainz and MusicBrainz
- Host: GitHub
- URL: https://github.com/jwillikers/driverbrainz
- Owner: jwillikers
- License: other
- Created: 2025-06-04T17:57:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-03T00:23:30.000Z (about 2 months ago)
- Last Synced: 2026-05-03T02:26:05.440Z (about 2 months ago)
- Topics: bookbrainz, musicbrainz, nix, selenium
- Language: Python
- Homepage:
- Size: 303 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.adoc
- Code of conduct: CODE_OF_CONDUCT.adoc
Awesome Lists containing this project
README
= DriverBrainz
Jordan Williams
:experimental:
:icons: font
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:Asciidoctor_: https://asciidoctor.org/[Asciidoctor]
:BookBrainz: https://bookbrainz.org/[BookBrainz]
:Firefox: https://www.mozilla.org/en-US/firefox/new/[Firefox]
:just: https://github.com/casey/just[just]
:Linux: https://www.linuxfoundation.org/[Linux]
:MusicBrainz: https://musicbrainz.org/[MusicBrainz]
:Nix: https://nixos.org/[Nix]
:nix-direnv: https://github.com/nix-community/nix-direnv[nix-direnv]
:pip-tools: https://github.com/jazzband/pip-tools[pip-tools]
:pre-commit: https://github.com/nix-community/nixpkgs-update[pre-commit]
:Python: https://www.python.org/[Python]
:Selenium: https://www.selenium.dev/[Selenium]
image:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json[Ruff, link=https://github.com/astral-sh/ruff]
Automates time-consuming tasks contributing metadata to {BookBrainz} and {MusicBrainz}.
Ever find it a hassle to add large series of works bo BookBrainz or MusicBrainz?
This project tries to make it easier to automate such things.
== How it Works
DriverBrainz is just a Python project that drives a web browser using {Selenium} to automate adding series of works to BookBrainz and MusicBrainz.
== Getting Started
This project uses Nix to manage all of the Python dependencies as well as the Selenium webdriver.
The instructions here are intended for Linux
. Install an implementation of {Nix}, such as https://lix.systems[Lix] used here.
+
[,sh]
----
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
----
. Clone this project's repository.
+
[,sh]
----
git clone https://github.com/jwillikers/driverbrainz.git
----
. Change into the project directory.
+
[,sh]
----
cd driverbrainz
----
. Update the `data.json` file with the details for the series.
. Set the environment variable `MUSICBRAINZ_USERNAME` to your user's MusicBrainz username.
The following demonstrates this for the fish shell.
+
[,sh]
----
set --export --universal MUSICBRAINZ_USERNAME 'my-username'
----
. Set the environment variable `MUSICBRAINZ_PASSWORD` to your user's MusicBrainz password.
The following demonstrates this for the fish shell.
+
[,sh]
----
set --export --universal MUSICBRAINZ_PASSWORD '****'
----
. Run DriverBrainz from the Nix development environment.
Use `--range-start` and `--range-end` to define a range of integers correlating to each chapter or volume in the series.
Alternatively, define individual indices in a list using the `range` key in the `data.json` file.
+
[,sh]
----
nix develop --command ./driverbrainz.py --range-start 1 --range-end 200
----
== Development
I've added development environment and some helpers using {Nix}.
The `nix develop` command can be used to enter or run commands in an environment with all of the necessary dependencies.
For convenience, direnv can be used to automatically load this environment when entering the project's directory.
The https://marketplace.visualstudio.com/items?itemName=mkhl.direnv[mkhl.direnv VSCode extension] integrates this environment in VSCode for development.
Nix also generates the configuration for {pre-commit}, which automates formatting and various checks when committing changes.
Follow the instructions here to set up your development environment using Nix.
. Install direnv for your system according to the https://direnv.net/docs/installation.html[direnv installation instructions].
+
[,sh]
----
sudo rpm-ostree install direnv
sudo systemctl reboot
----
. Integrate direnv with your shell by following the instructions on the https://direnv.net/docs/hook.html[direnv Setup page].
. Permit the direnv configuration for the repository.
+
[,sh]
----
direnv allow
----
. Modify the `driverbrainz.py` script to suite your needs.
. Run the `driverbrainz.py` script.
+
[,sh]
----
nix develop --command ./driverbrainz.py
----
== References
* https://www.selenium.dev/documentation[Selenium Documentation]
* https://selenium-python.readthedocs.io/index.html[Selenium Python Documentation]
== Contributing
Contributions in the form of issues, feedback, and even pull requests are welcome.
Make sure to adhere to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct].
== Open Source Software
This project is built on the hard work of countless open source contributors.
Several of these projects are enumerated below.
* {Asciidoctor_}
* {Firefox}
* {Linux}
// * {pip-tools}
* {Nix}
* {pre-commit}
* {Python}
* {Selenium}
== Code of Conduct
Refer to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct] for details.
== License
This repository is licensed under the https://www.gnu.org/licenses/gpl-3.0.html[GPLv3], a copy of which is provided link:LICENSE.adoc[here].
© 2025 Jordan Williams
== Authors
mailto:{email}[{author}]