# ๐ถ MusicBrainz2Notion
A tool for syncing artist and music data from MusicBrainz to Notion databases.
Simply add artist [MusicBrainz](https://musicbrainz.org/) IDs in a Notion database, and the app will automatically fetch and update their data, including albums and songs.
> โจ MusicBrainz is an open and collaborative music encyclopedia that collects music metadata and makes it available to the public.
<br />
<p align="center">
<img src="media/screenshots/artist_db.png" alt="MusicBrainz2Notion Artist Database" style="max-width: 850px; height: auto; border-radius: 10px;">
</p>
## ๐ธ Screenshots <!-- omit from toc -->
<details>
<summary>Click to expand screenshots</summary>
### Artist Database - Tier List View
![Artist Database](media/screenshots/artist_db.png)
### Release Database - Table View
![Release Database](media/screenshots/release_db.png)
### Tracks Database - Table View
![Track Database](media/screenshots/track_db.png)
</details>
## Contents <!-- omit from toc -->
- [โฌ๏ธ Download](#๏ธ-download)
- [๐ Getting Started](#-getting-started)
- [โ Adding artists](#-adding-artists)
- [โ๏ธ Configuration](#๏ธ-configuration)
- [๐ Configuration file](#-configuration-file)
- [๐ Environment variables](#-environment-variables)
- [๐ฅ๏ธ Command-Line Arguments](#๏ธ-command-line-arguments)
- [โ ๏ธ Current Limitations](#๏ธ-current-limitations)
## โฌ๏ธ Download
Find the latest release for your OS [here](https://github.com/Kajiih/MusicBrainz2Notion/releases/latest).
## ๐ Getting Started
1. Duplicate the [Notion template](https://steel-pram-3bf.notion.site/El-Music-Box-2-0-10e20647c8df80368434ea6ac7208981) to your Notion workspace.
- The template comes with several views of the databases, like special views for tier lists, but you can customize them at will!
> ๐ก Keep note of the url of the duplicated page (`cmd/ctrl + L` to copy to clipboard), you will need it when using the app for the first time.
2. Set up a [Notion integration](https://developers.notion.com/docs/create-a-notion-integration#getting-started):
- Create the integration and obtain the Notion API key. Don't forget to grant the permissions to the integration for your newly duplicated page.
3. Run the app.
- You will be prompted for your notion API key and the url of the main page you duplicated.
- โ The first time you run the app, it will download a small part of MusicBrainz dataset so you need around free 10 GB in the app's folder. But don't worry, after processing the data, it only take only around 200 MB.
4. Discover who is the mystery artist in the template and enjoy your new music database ๐ถ!
## โ Adding artists
First, look up the MusicBrainz IDs (MBIDs) of the artists you want to sync to Notion.
> ๐ก [MBIDs](https://musicbrainz.org/doc/MusicBrainz_Identifier) are universal unique identifiers for artists, releases and songs. You can find the MBIDs in the URL of the artist's page: `https://musicbrainz.org/artist/<MBID>` or in the `details` tab of the artist's page (e.g. [here](https://musicbrainz.org/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da/details): `5b11f4ce-a62d-471e-81fc-a69a8278c7da`).
Once you have the artist IDs, create new pages in the [`Artist database`](https://steel-pram-3bf.notion.site/10e20647c8df80ae923cfa8e19d109d4?v=10e20647c8df81a58be0000cbafdcff3&pvs=4) and enter the MBIDs in the `mbid` field.
> ๐ก Make sure that the `To update` field is toggled on so that the app knows which artists to sync.
The next time you will run the app, all albums and songs of the artists, as well as all information about the artists themselves will be added to the database ๐!
## โ๏ธ Configuration
Use the configuration to:
- add a [fanart.tv](https://fanart.tv/) if you want better artist thumbnails
- update the notion api key or database ids
- change the release filters
- change the number of tags per page
- force the update of the database used to find [canonical releases](https://musicbrainz.org/doc/Canonical_MusicBrainz_data)
Configuration is loaded from three sources, from lowest to highest priority:
1. Configuration file
2. Environment variables
3. Command-line arguments
### ๐ Configuration file
Edit the [`settings.toml`](./settings.toml) file located in the application folder to update your database IDs, API keys, and personalize synchronization settings.
> ๐ก When you are prompted for the notion API key and the link of the database, the configuration file is automatically updated.
The configuration file is straightforward and includes comments to guide you through each setting.
### ๐ Environment variables
Some settings can be overridden by environment variables.
These can also be read from the `.env` file located in the application folder.
For more information on available environment variables, refer to the `.env` template and use the `--help` command with the command-line app.
### ๐ฅ๏ธ Command-Line Arguments
Itโs recommended to use a virtual environment for installation (for example with [uv](https://docs.astral.sh/uv/)).
Then install the application with:
```bash
pip install musicbrainz2notion
```
Now you can run the app via the command line and pass parameters such as the Notion API key, database IDs, or your fanart.tv API key.
```bash
musicbrainz2notion --notion YOUR_NOTION_API_KEY
```
Use the `--help` command to see all available options.
## โ ๏ธ Current Limitations
- **Large Databases**: The app isnโt fully optimized for very large databases yet, which may cause slower startup times as the number of pages increases.
- **Notion API**: The Notion API can sometimes be unreliable, and not every scenario is covered yetโoccasional crashes may occur.
- **Canonical release downloads**: Sometimes, the canonical release database has to be updated, which can take some time and requires approximately 10 GB of free disk space during the update process.
Raw data
{
"_id": null,
"home_page": null,
"name": "musicbrainz2notion",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "api, database, music, musicbrainz, notion, python, tier list",
"author": null,
"author_email": "Kajih <itskajih@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8b/41/b0159cfe6031ff9a1339799ebd7e72bc3c7d73bc39af299079be275fef9a/musicbrainz2notion-0.5.3.tar.gz",
"platform": null,
"description": "# \ud83c\udfb6 MusicBrainz2Notion\n\nA tool for syncing artist and music data from MusicBrainz to Notion databases.\nSimply add artist [MusicBrainz](https://musicbrainz.org/) IDs in a Notion database, and the app will automatically fetch and update their data, including albums and songs.\n\n> \u2728 MusicBrainz is an open and collaborative music encyclopedia that collects music metadata and makes it available to the public.\n\n<br />\n<p align=\"center\">\n <img src=\"media/screenshots/artist_db.png\" alt=\"MusicBrainz2Notion Artist Database\" style=\"max-width: 850px; height: auto; border-radius: 10px;\">\n</p>\n\n## \ud83d\udcf8 Screenshots <!-- omit from toc -->\n\n<details>\n <summary>Click to expand screenshots</summary>\n\n### Artist Database - Tier List View\n\n![Artist Database](media/screenshots/artist_db.png)\n\n### Release Database - Table View\n\n![Release Database](media/screenshots/release_db.png)\n\n### Tracks Database - Table View\n\n![Track Database](media/screenshots/track_db.png)\n\n</details>\n\n## Contents <!-- omit from toc -->\n\n- [\u2b07\ufe0f Download](#\ufe0f-download)\n- [\ud83c\udfc3 Getting Started](#-getting-started)\n- [\u2795 Adding artists](#-adding-artists)\n- [\u2699\ufe0f Configuration](#\ufe0f-configuration)\n - [\ud83d\udcdd Configuration file](#-configuration-file)\n - [\ud83c\udf10 Environment variables](#-environment-variables)\n - [\ud83d\udda5\ufe0f Command-Line Arguments](#\ufe0f-command-line-arguments)\n- [\u26a0\ufe0f Current Limitations](#\ufe0f-current-limitations)\n\n## \u2b07\ufe0f Download\n\nFind the latest release for your OS [here](https://github.com/Kajiih/MusicBrainz2Notion/releases/latest).\n\n## \ud83c\udfc3 Getting Started\n\n1. Duplicate the [Notion template](https://steel-pram-3bf.notion.site/El-Music-Box-2-0-10e20647c8df80368434ea6ac7208981) to your Notion workspace.\n - The template comes with several views of the databases, like special views for tier lists, but you can customize them at will!\n\n > \ud83d\udca1 Keep note of the url of the duplicated page (`cmd/ctrl + L` to copy to clipboard), you will need it when using the app for the first time.\n\n2. Set up a [Notion integration](https://developers.notion.com/docs/create-a-notion-integration#getting-started):\n - Create the integration and obtain the Notion API key. Don't forget to grant the permissions to the integration for your newly duplicated page.\n\n3. Run the app.\n - You will be prompted for your notion API key and the url of the main page you duplicated.\n - \u2757 The first time you run the app, it will download a small part of MusicBrainz dataset so you need around free 10 GB in the app's folder. But don't worry, after processing the data, it only take only around 200 MB.\n\n4. Discover who is the mystery artist in the template and enjoy your new music database \ud83c\udfb6!\n\n## \u2795 Adding artists\n\nFirst, look up the MusicBrainz IDs (MBIDs) of the artists you want to sync to Notion.\n\n> \ud83d\udca1 [MBIDs](https://musicbrainz.org/doc/MusicBrainz_Identifier) are universal unique identifiers for artists, releases and songs. You can find the MBIDs in the URL of the artist's page: `https://musicbrainz.org/artist/<MBID>` or in the `details` tab of the artist's page (e.g. [here](https://musicbrainz.org/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da/details): `5b11f4ce-a62d-471e-81fc-a69a8278c7da`).\n\nOnce you have the artist IDs, create new pages in the [`Artist database`](https://steel-pram-3bf.notion.site/10e20647c8df80ae923cfa8e19d109d4?v=10e20647c8df81a58be0000cbafdcff3&pvs=4) and enter the MBIDs in the `mbid` field.\n\n> \ud83d\udca1 Make sure that the `To update` field is toggled on so that the app knows which artists to sync.\n\nThe next time you will run the app, all albums and songs of the artists, as well as all information about the artists themselves will be added to the database \ud83c\udf89!\n\n## \u2699\ufe0f Configuration\n\nUse the configuration to:\n\n- add a [fanart.tv](https://fanart.tv/) if you want better artist thumbnails\n- update the notion api key or database ids\n- change the release filters\n- change the number of tags per page\n- force the update of the database used to find [canonical releases](https://musicbrainz.org/doc/Canonical_MusicBrainz_data)\n\nConfiguration is loaded from three sources, from lowest to highest priority:\n\n 1. Configuration file\n 2. Environment variables\n 3. Command-line arguments\n\n### \ud83d\udcdd Configuration file\n\nEdit the [`settings.toml`](./settings.toml) file located in the application folder to update your database IDs, API keys, and personalize synchronization settings.\n\n> \ud83d\udca1 When you are prompted for the notion API key and the link of the database, the configuration file is automatically updated.\n\nThe configuration file is straightforward and includes comments to guide you through each setting.\n\n### \ud83c\udf10 Environment variables\n\nSome settings can be overridden by environment variables.\nThese can also be read from the `.env` file located in the application folder.\n\nFor more information on available environment variables, refer to the `.env` template and use the `--help` command with the command-line app.\n\n### \ud83d\udda5\ufe0f Command-Line Arguments\n\nIt\u2019s recommended to use a virtual environment for installation (for example with [uv](https://docs.astral.sh/uv/)).\nThen install the application with:\n\n```bash\npip install musicbrainz2notion\n```\n\nNow you can run the app via the command line and pass parameters such as the Notion API key, database IDs, or your fanart.tv API key.\n\n```bash\nmusicbrainz2notion --notion YOUR_NOTION_API_KEY\n```\n\nUse the `--help` command to see all available options.\n\n## \u26a0\ufe0f Current Limitations\n\n- **Large Databases**: The app isn\u2019t fully optimized for very large databases yet, which may cause slower startup times as the number of pages increases.\n- **Notion API**: The Notion API can sometimes be unreliable, and not every scenario is covered yet\u2014occasional crashes may occur.\n- **Canonical release downloads**: Sometimes, the canonical release database has to be updated, which can take some time and requires approximately 10 GB of free disk space during the update process.\n",
"bugtrack_url": null,
"license": null,
"summary": "A tool to sync artists and music databases from MusicBrainz to Notion.",
"version": "0.5.3",
"project_urls": {
"Issues": "https://github.com/Kajiih/musicbrainz2notion/issues",
"Repository": "https://github.com/Kajiih/musicbrainz2notion"
},
"split_keywords": [
"api",
" database",
" music",
" musicbrainz",
" notion",
" python",
" tier list"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "727d76d0c16d17cd80c50a17306c93f5ad4ef0ac3fb540b73f91f0224f4242d4",
"md5": "7e9c89b63f207d13462200d0ea4456e0",
"sha256": "dc365f9bb7aeab12da88c1f893620683b13a6a387a89b8588776536803ac97cc"
},
"downloads": -1,
"filename": "musicbrainz2notion-0.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7e9c89b63f207d13462200d0ea4456e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 40034,
"upload_time": "2024-12-31T18:24:31",
"upload_time_iso_8601": "2024-12-31T18:24:31.421671Z",
"url": "https://files.pythonhosted.org/packages/72/7d/76d0c16d17cd80c50a17306c93f5ad4ef0ac3fb540b73f91f0224f4242d4/musicbrainz2notion-0.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8b41b0159cfe6031ff9a1339799ebd7e72bc3c7d73bc39af299079be275fef9a",
"md5": "07ad468d999e8e0ce8ad361863b2f5ab",
"sha256": "007fcfde2357795f2f914f4299eb6e1bbd7ae7fc158665853f00451cc44a2eca"
},
"downloads": -1,
"filename": "musicbrainz2notion-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "07ad468d999e8e0ce8ad361863b2f5ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 1198864,
"upload_time": "2024-12-31T18:24:28",
"upload_time_iso_8601": "2024-12-31T18:24:28.942901Z",
"url": "https://files.pythonhosted.org/packages/8b/41/b0159cfe6031ff9a1339799ebd7e72bc3c7d73bc39af299079be275fef9a/musicbrainz2notion-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-31 18:24:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kajiih",
"github_project": "musicbrainz2notion",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "musicbrainz2notion"
}