Beets
Contents
Beets Music Tagger
Installation
# dnf install beets beets-plugins
pip install beets
Quickstart
# Import a whole folder
beet import ~/Music
# Import a single file, moving it to its new location
beet import -m Charly_Garcia-Los_Dinosaurios.opus
Configuration
Config file must have .yaml
extension, yml
extension won’t be recognized
cat > ~/.config/beets/config.yaml << 'EOF'
import:
#move: yes # Move files instead of copying them (overwrites copy option)
copy: no # Do not copy files to de Music directory
write: no # Do not write tags when adding to the database
incremental: yes # Skip importing directories already added
log: beets.log
paths:
# Filename format
default: $albumartist/$album/$track-$title
singleton: Singles/$artist-$title
comp: $genre/$album/$track-$title # Compilations
albumtype:soundtrack: Soundtracks/$album/$track-$title
asciify_paths: yes
EOF
Other options:
replace
: RegEx/Replacement pairs to be applied to all filenamesset_fields
: Default field values for new music, as a dictionary
Plugins
# Install
pip install beets[fetchart,lyrics,lastgenre]
cat >> ~/.config/beets/config.yaml << 'EOF'
plugins: fetchart lyrics lastgenre
pluginpath:
- /usr/lib/python3.12/site-packages/beetsplug
Some useful plugins. Those marked with X
are external, the others native
Those marked with D
are deprecated, inactive projects
Autotagger
chroma
: Use Acoustid fingerprinting to identify audio filesfromfilename
: Guess metadata for untagged tracks from their filenames
Metadata
parentwork
: Fetch work titles and works they are part offetchart
: Fetch album cover art from various sourcesembedart
: Embed album art images into files’ metadataftintitle
: Add “featured” artists to the title fieldbeets-yearfixer
: Attempts to fix missingoriginal_year
oryear
(X)beets-importreplace
: Perform regex replacements on incoming metadata (X)beets-xtractor
: Fetch attributes likeis_instrumental
ormood_happy
(X)
Files
beets-check
: Automatically checksums your files (X)beets-alternatives
: Different versions of your songs for each device (X)drop2beets
: Import singles as soon as they are dropped in a folder (X)duplicates
: List duplicate tracks or albumsbeets-noimport
: Add directories to the incremental import skip list (X)
Miscellaneous
beets-ydl
: downloads audio from youtube-dl (X,D)beets-autofix
: Automates repetitive tasks (X)
Playback
random
: Randomly choose albums and tracks from your librarycmus
: Integrates withcmus
music player(X)play
: sends the results of a music query to your music player (X,D)
Shell Completion
You can get completion script by running beet completion
. From there you have two options available.
- Loading the script dinamically. This will load an updated script every time
~/.bashrc
is sourced
echo 'eval "$(beet completion)"' >> ~/.bashrc
source ~/.bashrc
- Dump the script into a file. If you’re worry about loading times, use this option. The cabeat is that you will have to create a new script every time you add a new plugin
beet completion > ~/.beetrc
echo 'source ~/.beetrc' >> ~/.bashrc
source ~/.bashrc
Be warned that you will have to escape special characters, for example for queries:
# Note the slash in front of the colon
beet list artpath\:
Files and Directories
- Database: ~/.config/beets/library.db
- Music Directory: ~/Music