Difference between revisions of "Beets"

From ArchWiki
Jump to: navigation, search
m (avoid contractions to comply with Help:Style#Language_register)
m (follow Help:Style guidelines; also, bullet points seemed unnecessary)
Line 9: Line 9:
 
== Configuration ==
 
== Configuration ==
  
{{Tip|Beets provides command for configuration manipulations. To edit the configuration file, use {{ic|beet config -e}} command. It will be opened with the text editor specified in the [[Environment variables|environment variable]] {{ic|EDITOR}}.}}
+
{{Tip|Beets provides a command for configuration manipulations. To edit the configuration file, run {{ic|beet config -e}}. It will be opened with the text editor specified in the [[Environment variables|environment variable]] {{ic|EDITOR}}.}}
User configuration are done in {{ic|~/.config/beets/config.yaml}} using [[Wikipedia:YAML|YAML]] syntax. For example:
+
User configuration is done in {{ic|~/.config/beets/config.yaml}} using [[Wikipedia:YAML|YAML]] syntax. For example:
 
{{hc|~/.config/beets/config.yaml|
 
{{hc|~/.config/beets/config.yaml|
 
directory: ~/Music            # The default library root directory.
 
directory: ~/Music            # The default library root directory.
Line 21: Line 21:
 
=== Add music ===
 
=== Add music ===
  
* Add music to your library and attempt to fix tags:
+
Add music to your library and attempt to fix tags:
 
  $ beet import <path>
 
  $ beet import <path>
  
* Add the single track without an album:
+
Add the single track without an album:
 
  $ beet import -s <path>
 
  $ beet import -s <path>
  
 
=== List music ===
 
=== List music ===
  
* List all music in your library:
+
List all music in your library:
 
  $ beet ls
 
  $ beet ls
  
* List all albums in your library:
+
List all albums in your library:
 
  $ beet ls -a
 
  $ beet ls -a
  
 
=== Remove music ===
 
=== Remove music ===
  
{{Tip|If remove music from your filesystem or do any changes to the files without using {{ic|beet}}, do not forget to run {{ic|beet upd}} command to update your library database.}}
+
{{Tip|If you remove music from your filesystem or do any changes to the files without using {{ic|beet}}, do not forget to run {{ic|beet upd}} to update your library database.}}
  
* Remove track(s) from your library:
+
Remove track(s) from your library:
 
  $ beet rm <part of name>
 
  $ beet rm <part of name>
  
* Remove album(s) from your library:
+
Remove album(s) from your library:
 
  $ beet rm -a <part of name>
 
  $ beet rm -a <part of name>
  
== Tips and Tricks ==
+
== Tips and tricks ==
  
=== Enabling Tab-completion in Bash ===
+
=== Enabling tab-completion in bash ===
  
Beets includes support for Bash shell [[Bash#Tab completion|command completion]]. To enable completion put the following line into your {{ic|.bashrc}}:
+
Beets includes support for Bash shell [[Bash#Tab completion|command completion]]. To enable completion, put the following line into your {{ic|.bashrc}}:
 
{{hc|~/.bashrc|eval "$(beet completion)"}}
 
{{hc|~/.bashrc|eval "$(beet completion)"}}
 
You will also need to [[Pacman|install]] {{Pkg|bash-completion}} for this to work.
 
You will also need to [[Pacman|install]] {{Pkg|bash-completion}} for this to work.

Revision as of 20:05, 29 April 2015

Beets is a music tagger and library organizer using the MusicBrainz database.

Installation

Install the beets package from the official repositories or beets-gitAUR from the AUR.

Configuration

Tip: Beets provides a command for configuration manipulations. To edit the configuration file, run beet config -e. It will be opened with the text editor specified in the environment variable EDITOR.

User configuration is done in ~/.config/beets/config.yaml using YAML syntax. For example:

~/.config/beets/config.yaml
directory: ~/Music            # The default library root directory.
library: ~/Music/library.db   # The default library database file to use.
color: yes                    # Using colors in the terminal

Usage

Add music

Add music to your library and attempt to fix tags:

$ beet import <path>

Add the single track without an album:

$ beet import -s <path>

List music

List all music in your library:

$ beet ls

List all albums in your library:

$ beet ls -a

Remove music

Tip: If you remove music from your filesystem or do any changes to the files without using beet, do not forget to run beet upd to update your library database.

Remove track(s) from your library:

$ beet rm <part of name>

Remove album(s) from your library:

$ beet rm -a <part of name>

Tips and tricks

Enabling tab-completion in bash

Beets includes support for Bash shell command completion. To enable completion, put the following line into your .bashrc:

~/.bashrc
eval "$(beet completion)"

You will also need to install bash-completion for this to work.