{"id":18733955,"url":"https://github.com/mgoltzsche/beets-container","last_synced_at":"2025-08-21T17:10:48.075Z","repository":{"id":198817107,"uuid":"700631495","full_name":"mgoltzsche/beets-container","owner":"mgoltzsche","description":"An opinionated, containerized beets distribution","archived":false,"fork":false,"pushed_at":"2024-10-31T01:15:49.000Z","size":166,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T06:12:26.774Z","etag":null,"topics":["audio","audio-analysis","audio-classification","audio-library","audio-processing","audio-processing-tools","beets","beets-configuration","container","containerized","docker"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgoltzsche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T01:20:31.000Z","updated_at":"2025-03-11T23:53:03.000Z","dependencies_parsed_at":"2023-10-15T18:26:02.068Z","dependency_job_id":"d7af727a-8c01-471b-929f-18655d731704","html_url":"https://github.com/mgoltzsche/beets-container","commit_stats":null,"previous_names":["mgoltzsche/beets-container"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/mgoltzsche/beets-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgoltzsche","download_url":"https://codeload.github.com/mgoltzsche/beets-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-container/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268689300,"owners_count":24291075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-analysis","audio-classification","audio-library","audio-processing","audio-processing-tools","beets","beets-configuration","container","containerized","docker"],"created_at":"2024-11-07T15:11:54.467Z","updated_at":"2025-08-04T11:33:46.958Z","avatar_url":"https://github.com/mgoltzsche.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# beets container\n\nAn opinionated, containerized [beets](https://github.com/beetbox/beets) distribution.\n\n## Container variants\n\nThe beets container image is provided in two flavours:\n* [`ghcr.io/mgoltzsche/beets`](https://github.com/mgoltzsche/beets-container/pkgs/container/beets): beets without additional plugins but the [web API](https://beets.readthedocs.io/en/stable/plugins/web.html) installed.\n* [`ghcr.io/mgoltzsche/beets-plugins`](https://github.com/mgoltzsche/beets-container/pkgs/container/beets-plugins): beets with additional plugins (using the configuration within the library directory):\n  * [ytimport](https://github.com/mgoltzsche/beets-ytimport): Adds a command to import (liked) tracks from Youtube/SoundCloud into your beets library.\n  * [chroma](https://beets.readthedocs.io/en/stable/plugins/chroma.html): Generates/matches an acoustic fingerprint on track import.\n  * [lastgenre](https://beets.readthedocs.io/en/stable/plugins/lastgenre.html): Gets the genre for a track [Last.fm](https://www.last.fm/) on import.\n  * [discogs](https://beets.readthedocs.io/en/stable/plugins/discogs.html): Allows to match tracks against [Discogs](https://www.discogs.com) (optional; requires credentials to be configured).\n  * [xtractor](https://github.com/adamjakab/BeetsPluginXtractor): Adds a command to analyze your library using [Essentia](https://essentia.upf.edu/index.html) and store the results as additional track fields within your library.\n  * [describe](https://github.com/adamjakab/BeetsPluginDescribe): Adds a command to visualize the data distribution of a given field within your beets library.\n  * [mpdstats](https://beets.readthedocs.io/en/stable/plugins/mpdstats.html): Adds a command to connect with an [MPD](https://mpd.readthedocs.io/en/latest/protocol.html) player to automatically rate tracks based on play and skip actions.\n\n## Usage\n\nThe following examples assume you have configured a directory as your beets music library as follows:\n```sh\nBEETS_LIBRARY=path/to/your/music/library\nmkdir -p $BEETS_LIBRARY\n```\nThe beets container will store the imported music as well as an SQLite DB and the Beet configuration within that directory.\nThe `ghcr.io/mgoltzsche/beets-plugins` container creates the configuration file `$BEETS_LIBRARY/beets/config.yaml` if it does not exist yet.\nFor more information, see the [beets documentation](https://beets.readthedocs.io/en/stable/).\n\n### Managing your music library\n\nTo initialize/manage your beets library, you can use the `ghcr.io/mgoltzsche/beets-plugins` container image.\n\nYou can start a containerized shell as follows:\n```sh\ndocker run -it --rm -u `id -u`:`id -g` \\\n\t--mount \"type=bind,src=${BEETS_LIBRARY},dst=/data\" \\\n\tghcr.io/mgoltzsche/beets-plugins\n```\n\nWithin the containerized shell you can perform maintenance operations with your music library interactively, e.g.:\n```sh\n# Import songs from Youtube:\nbeet ytimport https://www.youtube.com/watch?v=8soQkubMk1g \\\n\thttps://www.youtube.com/watch?v=gtiZL33hoTY\n# Import 3 liked songs from Youtube (prompts for login):\nbeet ytimport --likes --max-likes 3\n# List the tracks within your library:\nbeet ls -f '$artist - $title ($genre)'\n# Inspect a particular track:\nbeet info -l \"Ça plane pour moi\"\n# Assign genres to all tracks:\nbeet autogenre\n# Generate M3U playlists (based on configured rules/queries):\nbeet splupdate\n# Inspect the distribution of genres within your library:\nbeet describe genre\n# Analyze your library using Essentia and save the results as metadata:\nbeet xtractor\n# List supported fields\nbeet fields\n# List the danceable tracks within your library, sorted by danceability:\nbeet ls -f '$danceable - $artist - $title' danceable:0.8..1 danceable-\n# Get a random danceable track:\nbeet random danceable:0.8..1\n```\n\nTo import a local music directory into your beets audio library, run e.g.:\n```sh\nIMPORT_SÒURCE_DIR=path/to/import/audio/from\ndocker run -it --rm -u `id -u`:`id -g` \\\n\t--mount \"type=bind,src=${BEETS_LIBRARY},dst=/data\" \\\n\t--mount \"type=bind,src=${IMPORT_SOURCE_DIR},dst=/import\" \\\n\tghcr.io/mgoltzsche/beets-plugins import /import -si\n```\n_Please note that the `import` command is prompting you for input for each track without a strong match._\n\nTo play tracks via pulseaudio, run e.g.:\n```sh\ndocker run -ti --rm -u `id -u`:`id -g` \\\n\t--mount \"type=bind,src=${BEETS_LIBRARY},dst=/data\" \\\n\t-v /run:/host/run \\\n\t-e PULSE_SERVER=unix:/host/run/user/`id -u`/pulse/native \\\n\tghcr.io/mgoltzsche/beets-plugins play mood_happy:0.8..1 --args=--shuffle\n```\n_Please note that the `PULSE_SERVER` env var has to be specified and, when using a unix socket, the socket to be mounted._\n\n### Using your music library\n\nYou can access the audio files and generated m3u playlists within your library locally directly using a player of your choice.\nSimilarly, you can copy/sync the library to your mobile phone or export it to an mp3 player in order to be able to listen to your music library even when there's no internet connectivity.\n\nAlternatively, the beets web plugin serves a minimal web GUI and an API that enables (remote) players to browse, search and stream music from your library via HTTP.\nTo serve the beets web API, run:\n```sh\ndocker run --rm -u `id -u`:`id -g` -p 8337:8337 \\\n\t--mount \"type=bind,src=${BEETS_LIBRARY},dst=/data\" \\\n\tghcr.io/mgoltzsche/beets\n```\nNow you can access your library at e.g. [`http://localhost:8337`](http://localhost:8337).\n\nWhen you generated playlists using the `beet-splupdate` script within the maintenance container previously, you can access them at [`http://localhost:8337/m3u/`](http://localhost:8337/m3u/).\n\n## Development\n\nTo list all supported targets, run `make help`.\n\n### Prerequisites\n\n* git\n* make\n* [docker 20+](https://docs.docker.com/engine/install/)\n* [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) (optional; if you want to deploy to Kubernetes)\n\n### Build the application\nTo build the application container image using [skaffold](https://skaffold.dev), run:\n```sh\nmake image\n```\n\n### Run a containerized shell\n\n```sh\nmake beets-sh\n```\n\n### Run the beets web server\n\n```sh\nmake beets-web\n```\n\n### Deploy the application to Kubernetes\nTo deploy the application using [skaffold](https://skaffold.dev), run:\n```sh\nmake deploy\n```\nTo deploy the application in debug mode (debug ports forwarded), stream its logs and redeploy on source code changes automatically, run:\n```sh\nmake debug\n```\n\nTo undeploy the application, run:\n```sh\nmake undeploy\n```\n\n### Apply blueprint updates\nTo apply blueprint updates to the application codebase, update the [kpt](https://kpt.dev/) package:\n1. Before updating the package, make sure you don't have uncommitted changes in order to be able to distinguish package update changes from others.\n2. Call `make blueprint-update` or rather [`kpt pkg update`](https://kpt.dev/reference/cli/pkg/update/) and [`kpt fn render`](https://kpt.dev/reference/cli/fn/render/) (applies the configuration within [`setters.yaml`](./setters.yaml) to the manifests and `skaffold.yaml`).\n3. Before committing the changes, review them carefully and make manual changes if necessary.\n\nTL;DR: [Variant Constructor Pattern](https://kpt.dev/guides/variant-constructor-pattern)\n\n## Release\n\nThe release process is driven by [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/), letting the CI pipeline generate a version and publish a release depending on the [commit messages](https://semantic-release.gitbook.io/semantic-release/#commit-message-format) on the `main` branch.\n\n## Credits\n\nThe `ghcr.io/mgoltzsche/beets-plugins` container image produced by this repository includes a custom build of [Essentia](https://essentia.upf.edu/) extractors as well as a copy of [the models](https://essentia.upf.edu/svm_models/).\nEssentia is licensed under the GNU Affero General Public License v3.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fbeets-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgoltzsche%2Fbeets-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fbeets-container/lists"}