https://github.com/guerda/beets-statistics
Generate insights into your music collection with beets
https://github.com/guerda/beets-statistics
beets music-library
Last synced: 6 months ago
JSON representation
Generate insights into your music collection with beets
- Host: GitHub
- URL: https://github.com/guerda/beets-statistics
- Owner: guerda
- License: gpl-3.0
- Created: 2024-07-28T18:33:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-19T18:40:30.000Z (6 months ago)
- Last Synced: 2026-01-20T00:50:50.793Z (6 months ago)
- Topics: beets, music-library
- Language: Python
- Homepage:
- Size: 5.6 MB
- Stars: 23
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Beets statistics
## Intro
A well maintained music library is a great thing.
Wouldn't insights on such a library be great?
With [beets](https://beets.io) you can manage and relate your music files to MusicBrainz IDs with all their great metadata.
This project, _beets statistics_, offers a simple web page, which shows how many jazz albums you have, what the quality factor of your library is and what your top decade of music is.
In order to work, beets-statistics needs a beets library, so you should import all your music files with beets first.
## What does beets-statistics look like?
Here's a couple of screenshot showing beets-statistics in action:
| General statistics about the music library | Complete album list | Top genre list |
|-|-|-|
|  |  |  |
| Genre distribution | Bitrate distribution |
|-|-|
|  | ![Screenshot of a web page with a table with two colums. The colums are titled "Bitrate [kbit/s]" and "Number of tracks". The bitrate buckets are listing bitrates from 1410 down to 160 kbit/s. The green progress bar represents the number of tracks in comparison to the total number of tracks. The largest progress bar is at 190 kbit/s with 1752 tracks.](img/screenshot-bitrate.png) |
## How to run beets statistics?
### Run beets-statistics with Python
* Install Python 3.9 or higher
* Install `pipenv`
* Run `pipenv install` in the source directory
* Locate your beets library database
* Run `MUSICLIBRARY_DB="" pipenv run prod` to start the web app in production mode.
* Open the device's IP address on port 8000
### Run beets-statistics with Docker Compose
`docker-compose.yaml`
Be sure to mount the musiclibrary.db in the volume section
```
services:
beets-statistics:
container_name: beets-statistics
restart: always
image: ghcr.io/guerda/guerda/beets-statistics:0.0.1
volumes:
- /home/user/.beets/musiclibrary.db:/app/musiclibrary.db:ro
ports:
- 8000:8000
environment:
- MUSICLIBRARY_DB=/app/musiclibrary.db
```
## How to develop and/or contribute?
The development setup is pretty slim with `pipenv` and `ruff`.
Installing the necessary tools via `pipenv install --dev` gets you along.
You can start the web server in dev mode via
`pipenv run dev`
If you have a correction or an issue, open an issue here or contact me directly.
A PR in a separater branch in your fork goes a long way, so feel free to open it up.
# License
This project is licensed under GNU GPL 3.0.