mirror of
https://github.com/beetbox/beets.git
synced 2025-12-08 01:23:09 +01:00
document new Confit-based configuration
This commit is contained in:
parent
3c511b9e27
commit
11e1fd1bd8
25 changed files with 423 additions and 436 deletions
|
|
@ -96,12 +96,12 @@ Configuring
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
You'll want to set a few basic options before you start using beets. The
|
You'll want to set a few basic options before you start using beets. The
|
||||||
configuration is stored in a text file: on Unix-like OSes, the config file is at
|
configuration is stored in a text file: on Unix-like OSes, the config file is
|
||||||
``~/.beetsconfig``; on Windows, it's at ``%APPDATA%\beetsconfig.ini``. Create
|
at ``~/.config/beets/config.yaml``; on Windows, it's at
|
||||||
and edit the appropriate file with your favorite text editor. This file will
|
``%APPDATA%\beets\config.yaml``. Create and edit the appropriate file with your
|
||||||
start out empty, but here's good place to start::
|
favorite text editor. This file will start out empty, but here's good place to
|
||||||
|
start::
|
||||||
|
|
||||||
[beets]
|
|
||||||
directory: ~/music
|
directory: ~/music
|
||||||
library: ~/data/musiclibrary.blb
|
library: ~/data/musiclibrary.blb
|
||||||
|
|
||||||
|
|
@ -115,16 +115,27 @@ empty folder using beets' ``import`` command (see below). But you can configure
|
||||||
beets to behave many other ways:
|
beets to behave many other ways:
|
||||||
|
|
||||||
* Start with a new empty directory, but *move* new music in instead of copying
|
* Start with a new empty directory, but *move* new music in instead of copying
|
||||||
it (saving disk space). Put ``import_move: yes`` in your config file.
|
it (saving disk space). Put this in your config file::
|
||||||
|
|
||||||
|
import:
|
||||||
|
move: yes
|
||||||
|
|
||||||
* Keep your current directory structure; importing should never move or copy
|
* Keep your current directory structure; importing should never move or copy
|
||||||
files but instead just correct the tags on music. Put the line ``import_copy:
|
files but instead just correct the tags on music. Put the line ``copy: no``
|
||||||
no`` in your config file to disable any copying or renaming. Make sure to
|
under the ``import:`` heading in your config file to disable any copying or
|
||||||
point ``directory`` at the place where your music is currently stored.
|
renaming. Make sure to point ``directory`` at the place where your music is
|
||||||
|
currently stored.
|
||||||
|
|
||||||
* Keep your current directory structure and *do not* correct files' tags: leave
|
* Keep your current directory structure and *do not* correct files' tags: leave
|
||||||
files completely unmodified on your disk. (Corrected tags will still be stored
|
files completely unmodified on your disk. (Corrected tags will still be stored
|
||||||
in beets' database, and you can use them to do renaming or tag changes later.)
|
in beets' database, and you can use them to do renaming or tag changes later.)
|
||||||
Add both ``import_copy: no`` and ``import_write: no`` to your config file to
|
Put this in your config file::
|
||||||
disable renaming and tag-writing.
|
|
||||||
|
import:
|
||||||
|
copy: no
|
||||||
|
write: no
|
||||||
|
|
||||||
|
to disable renaming and tag-writing.
|
||||||
|
|
||||||
There are approximately six million other configuration options you can set
|
There are approximately six million other configuration options you can set
|
||||||
here, including the directory and file naming scheme. See
|
here, including the directory and file naming scheme. See
|
||||||
|
|
@ -151,7 +162,7 @@ this::
|
||||||
|
|
||||||
(Note that by default, this command will *copy music into the directory you
|
(Note that by default, this command will *copy music into the directory you
|
||||||
specified above*. If you want to use your current directory structure, set the
|
specified above*. If you want to use your current directory structure, set the
|
||||||
``import_copy`` config option.) To take the fast,
|
``import.copy`` config option.) To take the fast,
|
||||||
un-autotagged path, just say::
|
un-autotagged path, just say::
|
||||||
|
|
||||||
$ beet import -A /my/huge/mp3/library
|
$ beet import -A /my/huge/mp3/library
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,9 @@ with its Python bindings) on your system.
|
||||||
Using and Configuring
|
Using and Configuring
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
BPD is a plugin for beets. It comes with beets, but it's disabled by default. To
|
BPD is a plugin for beets. It comes with beets, but it's disabled by default.
|
||||||
enable it, you'll need to edit your ``.beetsconfig`` file and add the line
|
To enable it, you'll need to edit your :doc:`configuration file
|
||||||
``plugins: bpd``. Like so::
|
</reference/config>` and add ``bpd`` to your ``plugins:`` line.
|
||||||
|
|
||||||
[beets]
|
|
||||||
plugins: bpd
|
|
||||||
|
|
||||||
Then, you can run BPD by invoking::
|
Then, you can run BPD by invoking::
|
||||||
|
|
||||||
|
|
@ -66,14 +63,14 @@ the client can just as easily on a different computer from the server as it can
|
||||||
be run locally. Control your music from your laptop (or phone!) while it plays
|
be run locally. Control your music from your laptop (or phone!) while it plays
|
||||||
on your headless server box. Rad!
|
on your headless server box. Rad!
|
||||||
|
|
||||||
To configure the BPD server, add a ``[bpd]`` section to your ``.beetsconfig``
|
To configure the BPD server, add a ``bpd:`` section to your ``config.yaml``
|
||||||
file. The configuration values, which are pretty self-explanatory, are ``host``,
|
file. The configuration values, which are pretty self-explanatory, are ``host``,
|
||||||
``port``, and ``password``. Here's an example::
|
``port``, and ``password``. Here's an example::
|
||||||
|
|
||||||
[bpd]
|
bpd:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6600
|
port: 6600
|
||||||
password: seekrit
|
password: seekrit
|
||||||
|
|
||||||
Implementation Notes
|
Implementation Notes
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
||||||
|
|
@ -74,14 +74,9 @@ Using
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Once you have all the dependencies sorted out, you can enable fingerprinting by
|
Once you have all the dependencies sorted out, you can enable fingerprinting by
|
||||||
editing your :doc:`/reference/config`. Put ``chroma`` on your ``plugins:``
|
editing your :doc:`configuration file </reference/config>`. Put ``chroma`` on
|
||||||
line. Your config file should contain something like this::
|
your ``plugins:`` line. With that, beets will use fingerprinting the next time
|
||||||
|
you run ``beet import``.
|
||||||
[beets]
|
|
||||||
plugins: chroma
|
|
||||||
|
|
||||||
With that, beets will use fingerprinting the next time you run ``beet import``.
|
|
||||||
|
|
||||||
|
|
||||||
.. _submitfp:
|
.. _submitfp:
|
||||||
|
|
||||||
|
|
@ -91,11 +86,11 @@ Submitting Fingerprints
|
||||||
You can help expand the `Acoustid`_ database by submitting fingerprints for the
|
You can help expand the `Acoustid`_ database by submitting fingerprints for the
|
||||||
music in your collection. To do this, first `get an API key`_ from the Acoustid
|
music in your collection. To do this, first `get an API key`_ from the Acoustid
|
||||||
service. Just use an OpenID or MusicBrainz account to log in and you'll get a
|
service. Just use an OpenID or MusicBrainz account to log in and you'll get a
|
||||||
short token string. Then, add the key to your :doc:`/reference/config` as the
|
short token string. Then, add the key to your ``config.yaml`` as the
|
||||||
value ``apikey`` in a section called ``acoustid`` like so::
|
value ``apikey`` in a section called ``acoustid`` like so::
|
||||||
|
|
||||||
[acoustid]
|
acoustid:
|
||||||
apikey=AbCd1234
|
apikey: AbCd1234
|
||||||
|
|
||||||
Then, run ``beet submit``. (You can also provide a query to submit a subset of
|
Then, run ``beet submit``. (You can also provide a query to submit a subset of
|
||||||
your library.) The command will use stored fingerprints if they're available;
|
your library.) The command will use stored fingerprints if they're available;
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ To transcode music, this plugin requires the ``ffmpeg`` command-line
|
||||||
tool. If its executable is in your path, it will be found automatically
|
tool. If its executable is in your path, it will be found automatically
|
||||||
by the plugin. Otherwise, configure the plugin to locate the executable::
|
by the plugin. Otherwise, configure the plugin to locate the executable::
|
||||||
|
|
||||||
[convert]
|
convert:
|
||||||
ffmpeg: /usr/bin/ffmpeg
|
ffmpeg: /usr/bin/ffmpeg
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
@ -35,7 +35,7 @@ Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The plugin offers several configuration options, all of which live under the
|
The plugin offers several configuration options, all of which live under the
|
||||||
``[convert]`` section:
|
``convert:`` section:
|
||||||
|
|
||||||
* ``dest`` sets the directory the files will be converted (or copied) to.
|
* ``dest`` sets the directory the files will be converted (or copied) to.
|
||||||
A destination is required---you either have to provide it in the config file
|
A destination is required---you either have to provide it in the config file
|
||||||
|
|
@ -57,9 +57,9 @@ The plugin offers several configuration options, all of which live under the
|
||||||
|
|
||||||
Here's an example configuration::
|
Here's an example configuration::
|
||||||
|
|
||||||
[convert]
|
convert:
|
||||||
embed: false
|
embed: false
|
||||||
max_bitrate: 200
|
max_bitrate: 200
|
||||||
opts: -aq 4
|
opts: -aq 4
|
||||||
dest: /home/user/MusicForPhone
|
dest: /home/user/MusicForPhone
|
||||||
threads: 4
|
threads: 4
|
||||||
|
|
|
||||||
|
|
@ -25,30 +25,29 @@ Configuring
|
||||||
|
|
||||||
Beets includes its own Echo Nest API key, but you can `apply for your own`_ for
|
Beets includes its own Echo Nest API key, but you can `apply for your own`_ for
|
||||||
free from the EchoNest. To specify your own API key, add the key to your
|
free from the EchoNest. To specify your own API key, add the key to your
|
||||||
:doc:`/reference/config` as the value ``apikey`` in a section called
|
:doc:`configuration file </reference/config>` as the value for ``apikey`` under
|
||||||
``echonest_tempo`` like so::
|
the key ``echonest_tempo`` like so::
|
||||||
|
|
||||||
[echonest_tempo]
|
echonest_temo:
|
||||||
apikey=YOUR_API_KEY
|
apikey: YOUR_API_KEY
|
||||||
|
|
||||||
In addition, the ``autofetch`` config option lets you disable automatic tempo
|
In addition, the ``autofetch`` config option lets you disable automatic tempo
|
||||||
fetching during import. To do so, add this to your ``~/.beetsconfig``::
|
fetching during import. To do so, add this to your ``config.yaml``::
|
||||||
|
|
||||||
[echonest_tempo]
|
echonest_tempo:
|
||||||
autofetch: no
|
auto: no
|
||||||
|
|
||||||
.. _apply for your own: http://developer.echonest.com/account/register
|
.. _apply for your own: http://developer.echonest.com/account/register
|
||||||
|
|
||||||
Fetch Tempo During Import
|
Fetch Tempo During Import
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
To automatically fetch the tempo for songs you import, just enable the plugin
|
To automatically fetch the tempo for songs you import, just enable the plugin
|
||||||
by putting ``echonest_tempo`` on your config file's ``plugins`` line (see
|
by putting ``echonest_tempo`` on your config file's ``plugins`` line (see
|
||||||
:doc:`/plugins/index`), along with adding your EchoNest API key to your
|
:doc:`/plugins/index`). When importing new files, beets will now fetch the
|
||||||
``~/.beetsconfig``. When importing new files, beets will now fetch the
|
tempo for files that don't already have them. The bpm field will be stored in
|
||||||
tempo for files that don't already have them. The bpm field will be stored in
|
the beets database. If the ``import.write`` config option is on, then the tempo
|
||||||
the beets database. If the ``import_write`` config option is on, then the
|
will also be written to the files' tags.
|
||||||
tempo will also be written to the files' tags.
|
|
||||||
|
|
||||||
This behavior can be disabled with the ``autofetch`` config option (see below).
|
This behavior can be disabled with the ``autofetch`` config option (see below).
|
||||||
|
|
||||||
|
|
@ -61,7 +60,7 @@ items that match a query (see :doc:`/reference/query`). For example,
|
||||||
appropriate Magnetic Fields song, ``beet tempo magnetic fields`` will get
|
appropriate Magnetic Fields song, ``beet tempo magnetic fields`` will get
|
||||||
tempos for all my tracks by that band, and ``beet tempo`` will get tempos for
|
tempos for all my tracks by that band, and ``beet tempo`` will get tempos for
|
||||||
my entire library. The tempos will be added to the beets database and, if
|
my entire library. The tempos will be added to the beets database and, if
|
||||||
``import_write`` is on, embedded into files' metadata.
|
``import.write`` is on, embedded into files' metadata.
|
||||||
|
|
||||||
The ``-p`` option to the ``tempo`` command makes it print tempos out to the
|
The ``-p`` option to the ``tempo`` command makes it print tempos out to the
|
||||||
console so you can view the fetched (or previously-stored) tempos.
|
console so you can view the fetched (or previously-stored) tempos.
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ plugin (see :doc:`/plugins/index`). You'll also want to enable the
|
||||||
:doc:`/plugins/fetchart` to obtain the images to be embedded. Art will be
|
:doc:`/plugins/fetchart` to obtain the images to be embedded. Art will be
|
||||||
embedded after each album is added to the library.
|
embedded after each album is added to the library.
|
||||||
|
|
||||||
This behavior can be disabled with the ``autoembed`` config option (see below).
|
This behavior can be disabled with the ``auto`` config option (see below).
|
||||||
|
|
||||||
Manually Embedding and Extracting Art
|
Manually Embedding and Extracting Art
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
@ -40,11 +40,11 @@ embedded album art:
|
||||||
Configuring
|
Configuring
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
``autoembed`` option lets you disable automatic album art embedding.
|
The ``auto`` option lets you disable automatic album art embedding.
|
||||||
To do so, add this to your ``~/.beetsconfig``::
|
To do so, add this to your ``config.yaml``::
|
||||||
|
|
||||||
[embedart]
|
embedart:
|
||||||
autoembed: no
|
auto: no
|
||||||
|
|
||||||
A maximum image width can be configured as ``maxwidth`` to downscale images
|
A maximum image width can be configured as ``maxwidth`` to downscale images
|
||||||
before embedding them (the original image file is not altered). The resize
|
before embedding them (the original image file is not altered). The resize
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ the :ref:`art-filename` config option.
|
||||||
To disable automatic art downloading, just put this in your configuration
|
To disable automatic art downloading, just put this in your configuration
|
||||||
file::
|
file::
|
||||||
|
|
||||||
[fetchart]
|
fetchart:
|
||||||
autofetch: no
|
auto: no
|
||||||
|
|
||||||
Manually Fetching Album Art
|
Manually Fetching Album Art
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ The ``-t NUMBER`` option lets you specify how precise the fuzzy match has to be
|
||||||
(default is 0.7). To make a fuzzier search, try ``beet fuzzy -t 0.5 Varoeldur``.
|
(default is 0.7). To make a fuzzier search, try ``beet fuzzy -t 0.5 Varoeldur``.
|
||||||
A value of ``1`` will show only perfect matches and a value of ``0`` will match everything.
|
A value of ``1`` will show only perfect matches and a value of ``0`` will match everything.
|
||||||
|
|
||||||
The default threshold can also be set from the config file.::
|
The default threshold can also be set in the config file::
|
||||||
|
|
||||||
[fuzzy]
|
fuzzy:
|
||||||
threshold: 0.8
|
threshold: 0.8
|
||||||
|
|
|
||||||
|
|
@ -8,28 +8,21 @@ groups: warn and skip. The skip group is checked first. Whitelist overrides any
|
||||||
other patterns.
|
other patterns.
|
||||||
|
|
||||||
To use the plugin, enable it by including ``ihate`` in the ``plugins`` line of
|
To use the plugin, enable it by including ``ihate`` in the ``plugins`` line of
|
||||||
your beets config::
|
your beets config. Then, add an ``ihate:`` section to your configuration file::
|
||||||
|
|
||||||
[beets]
|
ihate:
|
||||||
plugins = ihate
|
# you will be warned about these suspicious genres/artists (regexps):
|
||||||
|
warn_genre=rnb soul power\smetal
|
||||||
You need to configure the plugin before use, so add the following section into
|
warn_artist=bad\band another\sbad\sband
|
||||||
your config file and adjust it to your needs::
|
warn_album=tribute\sto
|
||||||
|
# if you don't like a genre in general, but accept some band playing it,
|
||||||
[ihate]
|
# add exceptions here:
|
||||||
# you will be warned about these suspicious genres/artists (regexps):
|
warn_whitelist=hate\sexception
|
||||||
warn_genre=rnb soul power\smetal
|
# never import any of this:
|
||||||
warn_artist=bad\band another\sbad\sband
|
skip_genre=russian\srock polka
|
||||||
warn_album=tribute\sto
|
skip_artist=manowar
|
||||||
# if you don't like a genre in general, but accept some band playing it,
|
skip_album=christmas
|
||||||
# add exceptions here:
|
# but import this:
|
||||||
warn_whitelist=hate\sexception
|
skip_whitelist=
|
||||||
# never import any of this:
|
|
||||||
skip_genre=russian\srock polka
|
|
||||||
skip_artist=manowar
|
|
||||||
skip_album=christmas
|
|
||||||
# but import this:
|
|
||||||
skip_whitelist=
|
|
||||||
|
|
||||||
Note: The plugin will trust your decision in 'as-is' mode.
|
Note: The plugin will trust your decision in 'as-is' mode.
|
||||||
|
|
||||||
|
|
@ -4,21 +4,20 @@ ImportFeeds Plugin
|
||||||
The ``importfeeds`` plugin helps you keep track of newly imported music in your library.
|
The ``importfeeds`` plugin helps you keep track of newly imported music in your library.
|
||||||
|
|
||||||
To use the plugin, just put ``importfeeds`` on the ``plugins`` line in your
|
To use the plugin, just put ``importfeeds`` on the ``plugins`` line in your
|
||||||
:doc:`/reference/config`::
|
:doc:`configuration file </reference/config>`. Then set a few options under the
|
||||||
|
``importfeeds:`` section in the config file.
|
||||||
|
|
||||||
[beets]
|
The ``feeds_dir`` configuration option can be set to specify another folder
|
||||||
plugins: importfeeds
|
than the default library directory. Three different types of outputs coexist,
|
||||||
|
specify the ones you want to use by setting the ``feeds_formats`` parameter:
|
||||||
The ``feeds_dir`` parameter can be set to specify another folder than the default library directory.
|
|
||||||
Three different types of outputs coexist, specify the ones you want to use by setting the ``feeds_formats`` parameter:
|
|
||||||
|
|
||||||
- ``m3u``: catalog the imports in a centralized playlist. By default, the playlist is named ``imported.m3u``. To use a different file, just set the ``m3u_name`` parameter inside the ``importfeeds`` config section.
|
- ``m3u``: catalog the imports in a centralized playlist. By default, the playlist is named ``imported.m3u``. To use a different file, just set the ``m3u_name`` parameter inside the ``importfeeds`` config section.
|
||||||
- ``m3u_multi``: create a new playlist for each import (uniquely named by appending the date and track/album name).
|
- ``m3u_multi``: create a new playlist for each import (uniquely named by appending the date and track/album name).
|
||||||
- ``link``: create a symlink for each imported item. This is the recommended setting to propagate beets imports to your iTunes library: just drag and drop the ``feeds_dir`` folder on the iTunes dock icon.
|
- ``link``: create a symlink for each imported item. This is the recommended setting to propagate beets imports to your iTunes library: just drag and drop the ``feeds_dir`` folder on the iTunes dock icon.
|
||||||
|
|
||||||
An example of ``importfeeds`` configuration::
|
Here's an example configuration for this plugin::
|
||||||
|
|
||||||
[importfeeds]
|
importfeeds:
|
||||||
feeds_formats: m3u link
|
feeds_formats: m3u link
|
||||||
feeds_dir: ~/imports/
|
feeds_dir: ~/imports/
|
||||||
m3u_name: newfiles.m3u
|
m3u_name: newfiles.m3u
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,17 @@ To use a plugin, you have two options:
|
||||||
just means the plugin has to be installed on your system (e.g., with a
|
just means the plugin has to be installed on your system (e.g., with a
|
||||||
`setup.py` script or a command like `pip` or `easy_install`).
|
`setup.py` script or a command like `pip` or `easy_install`).
|
||||||
|
|
||||||
* Set the `pythonpath` config variable to point to the directory containing the
|
* Set the `pluginpath` config variable to point to the directory containing the
|
||||||
plugin. (See :doc:`/reference/cli`.)
|
plugin. (See :doc:`/reference/cli`.)
|
||||||
|
|
||||||
Then, set the `plugins` option in your `~/.beetsconfig` file, like so::
|
Then, set the `plugins` option in your `config.yaml` file, like so::
|
||||||
|
|
||||||
[beets]
|
plugins: mygreatplugin someotherplugin
|
||||||
plugins = mygreatplugin someotherplugin
|
|
||||||
|
|
||||||
The value for `plugins` should be a space-separated list of plugin module names.
|
The value for `plugins` can be a space-separated list of plugin names or
|
||||||
|
a YAML list like ``[foo, bar]``.
|
||||||
|
|
||||||
|
You can see which plugins are currently enabled by typing ``beet version``.
|
||||||
|
|
||||||
.. _included-plugins:
|
.. _included-plugins:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,26 +7,22 @@ file and refer to them from your template strings in the ``[paths]`` section
|
||||||
(see :doc:`/reference/config/`).
|
(see :doc:`/reference/config/`).
|
||||||
|
|
||||||
To use inline field definitions, first enable the plugin by putting ``inline``
|
To use inline field definitions, first enable the plugin by putting ``inline``
|
||||||
on your ``plugins`` line, like so::
|
on your ``plugins`` line in your configuration file. Then, make a
|
||||||
|
``pathfields:`` block in your config file. Under this key, every line
|
||||||
[beets]
|
defines a new template field; the key is the name of the field (you'll use the
|
||||||
plugins: inline
|
name to refer to the field in your templates) and the value is a Python
|
||||||
|
expression. The expression has all of a track's fields in scope, so you can
|
||||||
Then, make a ``[pathfields]`` section in your config file. In this section,
|
refer to any normal attributes (such as ``artist`` or ``title``) as Python
|
||||||
every line defines a new template field; the key is the name of the field
|
|
||||||
(you'll use the name to refer to the field in your templates) and the value is a
|
|
||||||
Python expression. The expression has all of a track's fields in scope, so you
|
|
||||||
can refer to any normal attributes (such as ``artist`` or ``title``) as Python
|
|
||||||
variables. Here are a couple of examples::
|
variables. Here are a couple of examples::
|
||||||
|
|
||||||
[pathfields]
|
pathfields:
|
||||||
initial: albumartist[0].upper() + u'.'
|
initial: albumartist[0].upper() + u'.'
|
||||||
disc_and_track: u'%02i.%02i' % (disc, track) if
|
disc_and_track: u'%02i.%02i' % (disc, track) if
|
||||||
disctotal > 1 else u'%02i' % (track)
|
disctotal > 1 else u'%02i' % (track)
|
||||||
|
|
||||||
(Note that the config file's syntax allows newlines in values if the subsequent
|
Note that YAML syntax allows newlines in values if the subsequent
|
||||||
lines are indented.) These examples define ``$initial`` and
|
lines are indented. These examples define ``$initial`` and
|
||||||
``$disc_and_track`` fields that can be referenced in path templates like so::
|
``$disc_and_track`` fields that can be referenced in path templates like so::
|
||||||
|
|
||||||
[paths]
|
paths:
|
||||||
default: $initial/$artist/$album%aunique{}/$disc_and_track $title
|
default: $initial/$artist/$album%aunique{}/$disc_and_track $title
|
||||||
|
|
|
||||||
|
|
@ -16,19 +16,16 @@ The plugin requires `pylast`_, which you can install using `pip`_ by typing::
|
||||||
pip install pylast
|
pip install pylast
|
||||||
|
|
||||||
After you have pylast installed, enable the plugin by putting ``lastgenre`` on
|
After you have pylast installed, enable the plugin by putting ``lastgenre`` on
|
||||||
your ``plugins`` line in :doc:`/reference/config`, like so::
|
your ``plugins`` line in :doc:`config file </reference/config>`.
|
||||||
|
|
||||||
[beets]
|
The plugin chooses genres based on a *whitelist*, meaning that only certain
|
||||||
plugins: lastgenre
|
tags can be considered genres. This way, tags like "my favorite music" or "seen
|
||||||
|
live" won't be considered genres. The plugin ships with a fairly extensive
|
||||||
|
internal whitelist, but you can set your own in the config file using the
|
||||||
|
``whitelist`` configuration value::
|
||||||
|
|
||||||
The plugin chooses genres based on a *whitelist*, meaning that only certain tags
|
lastgenre:
|
||||||
can be considered genres. This way, tags like "my favorite music" or "seen live"
|
whitelist: /path/to/genres.txt
|
||||||
won't be considered genres. The plugin ships with a fairly extensive internal
|
|
||||||
whitelist, but you can set your own in the config file using the ``whitelist``
|
|
||||||
configuration value::
|
|
||||||
|
|
||||||
[lastgenre]
|
|
||||||
whitelist: /path/to/genres.txt
|
|
||||||
|
|
||||||
The genre list file should contain one genre per line. Blank lines are ignored.
|
The genre list file should contain one genre per line. Blank lines are ignored.
|
||||||
For the curious, the default genre list is generated by a `script that scrapes
|
For the curious, the default genre list is generated by a `script that scrapes
|
||||||
|
|
@ -38,11 +35,12 @@ Wikipedia`_.
|
||||||
.. _pylast: http://code.google.com/p/pylast/
|
.. _pylast: http://code.google.com/p/pylast/
|
||||||
.. _script that scrapes Wikipedia: https://gist.github.com/1241307
|
.. _script that scrapes Wikipedia: https://gist.github.com/1241307
|
||||||
|
|
||||||
If no genre is found, you have the opportunity to specify a fixed string instead
|
If no genre is found, the file will be left unchanged. To instead specify a
|
||||||
(declare *fallback_str* with no value to blank the genre field)::
|
fallback genre, use the ``fallback`` configuration option. You can, of
|
||||||
|
course, use the empty string as a fallback, like so::
|
||||||
|
|
||||||
[lastgenre]
|
lastgenre:
|
||||||
fallback_str:
|
fallback: ''
|
||||||
|
|
||||||
|
|
||||||
Canonicalization
|
Canonicalization
|
||||||
|
|
@ -56,12 +54,12 @@ leaves of the tree represent the most specific genres.
|
||||||
To enable canonicalization, first install the `pyyaml`_ module (``pip install
|
To enable canonicalization, first install the `pyyaml`_ module (``pip install
|
||||||
pyyaml``). Then set the ``canonical`` configuration value::
|
pyyaml``). Then set the ``canonical`` configuration value::
|
||||||
|
|
||||||
[lastgenre]
|
lastgenre:
|
||||||
canonical:
|
canonical: ''
|
||||||
|
|
||||||
Leaving this value blank will use a built-in canonicalization tree. You can also
|
Setting this value to the empty string will use a built-in canonicalization
|
||||||
set it to a path, just like the ``whitelist`` config value, to use your own
|
tree. You can also set it to a path, just like the ``whitelist`` config value,
|
||||||
tree.
|
to use your own tree.
|
||||||
|
|
||||||
.. _YAML: http://www.yaml.org/
|
.. _YAML: http://www.yaml.org/
|
||||||
.. _pyyaml: http://pyyaml.org/
|
.. _pyyaml: http://pyyaml.org/
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ To automatically fetch lyrics for songs you import, just enable the plugin by
|
||||||
putting ``lyrics`` on your config file's ``plugins`` line (see
|
putting ``lyrics`` on your config file's ``plugins`` line (see
|
||||||
:doc:`/plugins/index`). When importing new files, beets will now fetch lyrics
|
:doc:`/plugins/index`). When importing new files, beets will now fetch lyrics
|
||||||
for files that don't already have them. The lyrics will be stored in the beets
|
for files that don't already have them. The lyrics will be stored in the beets
|
||||||
database. If the ``import_write`` config option is on, then the lyrics will also
|
database. If the ``import.write`` config option is on, then the lyrics will also
|
||||||
be written to the files' tags.
|
be written to the files' tags.
|
||||||
|
|
||||||
This behavior can be disabled with the ``autofetch`` config option (see below).
|
This behavior can be disabled with the ``auto`` config option (see below).
|
||||||
|
|
||||||
Fetching Lyrics Manually
|
Fetching Lyrics Manually
|
||||||
------------------------
|
------------------------
|
||||||
|
|
@ -27,7 +27,7 @@ match a query (see :doc:`/reference/query`). For example, ``beet lyrics magnetic
|
||||||
fields absolutely cuckoo`` will get the lyrics for the appropriate Magnetic
|
fields absolutely cuckoo`` will get the lyrics for the appropriate Magnetic
|
||||||
Fields song, ``beet lyrics magnetic fields`` will get lyrics for all my tracks
|
Fields song, ``beet lyrics magnetic fields`` will get lyrics for all my tracks
|
||||||
by that band, and ``beet lyrics`` will get lyrics for my entire library. The
|
by that band, and ``beet lyrics`` will get lyrics for my entire library. The
|
||||||
lyrics will be added to the beets database and, if ``import_write`` is on,
|
lyrics will be added to the beets database and, if ``import.write`` is on,
|
||||||
embedded into files' metadata.
|
embedded into files' metadata.
|
||||||
|
|
||||||
The ``-p`` option to the ``lyrics`` command makes it print lyrics out to the
|
The ``-p`` option to the ``lyrics`` command makes it print lyrics out to the
|
||||||
|
|
@ -36,9 +36,9 @@ console so you can view the fetched (or previously-stored) lyrics.
|
||||||
Configuring
|
Configuring
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The plugin has one configuration option, ``autofetch``, which lets you disable
|
The plugin has one configuration option, ``auto``, which lets you disable
|
||||||
automatic lyrics fetching during import. To do so, add this to your
|
automatic lyrics fetching during import. To do so, add this to your
|
||||||
``~/.beetsconfig``::
|
``config.yaml``::
|
||||||
|
|
||||||
[lyrics]
|
lyrics:
|
||||||
autofetch: no
|
auto: no
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ maintain your `music collection`_ list there.
|
||||||
|
|
||||||
To begin, just enable the ``mbcollection`` plugin (see :doc:`/plugins/index`).
|
To begin, just enable the ``mbcollection`` plugin (see :doc:`/plugins/index`).
|
||||||
Then, add your MusicBrainz username and password to your
|
Then, add your MusicBrainz username and password to your
|
||||||
:doc:`/reference/config` in a ``musicbrainz`` section::
|
:doc:`configuration file </reference/config>` under a ``musicbrainz`` section::
|
||||||
|
|
||||||
[musicbrainz]
|
musicbrainz:
|
||||||
user: USERNAME
|
user: you
|
||||||
pass: PASSWORD
|
pass: seekrit
|
||||||
|
|
||||||
Then, use the ``beet mbupdate`` command to send your albums to MusicBrainz. The
|
Then, use the ``beet mbupdate`` command to send your albums to MusicBrainz. The
|
||||||
command automatically adds all of your albums to the first collection it finds.
|
command automatically adds all of your albums to the first collection it finds.
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,14 @@ update `MPD`_'s index whenever you change your beets library.
|
||||||
|
|
||||||
.. _MPD: http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
|
.. _MPD: http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
|
||||||
|
|
||||||
To use it, enable it in your ``.beetsconfig`` by putting ``mpdupdate`` on your ``plugins`` line. Your ``.beetsconfig`` should look like this::
|
To use it, enable it in your ``config.yaml`` by putting ``mpdupdate`` on your
|
||||||
|
``plugins`` line. Then, you'll probably want to configure the specifics of your
|
||||||
|
MPD server. You can do that using an ``mpdupdate:`` section in your
|
||||||
|
``config.yaml``, which looks like this::
|
||||||
|
|
||||||
[beets]
|
mpdupdate:
|
||||||
plugins: mpdupdate
|
host: localhost
|
||||||
|
port: 6600
|
||||||
Then, you'll probably want to configure the specifics of your MPD server. You
|
password: seekrit
|
||||||
can do that using an ``[mpdupdate]`` section in your ``.beetsconfig``, which
|
|
||||||
looks like this::
|
|
||||||
|
|
||||||
[mpdupdate]
|
|
||||||
host = localhost
|
|
||||||
port = 6600
|
|
||||||
password = seekrit
|
|
||||||
|
|
||||||
With that all in place, you'll see beets send the "update" command to your MPD server every time you change your beets library.
|
With that all in place, you'll see beets send the "update" command to your MPD server every time you change your beets library.
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ Then enable the ``replaygain`` plugin (see :doc:`/reference/config`). If beets
|
||||||
doesn't automatically find the ``mp3gain`` or ``aacgain`` executable, you can
|
doesn't automatically find the ``mp3gain`` or ``aacgain`` executable, you can
|
||||||
configure the path explicitly like so::
|
configure the path explicitly like so::
|
||||||
|
|
||||||
[replaygain]
|
replaygain:
|
||||||
command: /Applications/MacMP3Gain.app/Contents/Resources/aacgain
|
command: /Applications/MacMP3Gain.app/Contents/Resources/aacgain
|
||||||
|
|
||||||
Usage & Configuration
|
Usage & Configuration
|
||||||
---------------------
|
---------------------
|
||||||
|
|
@ -37,10 +37,10 @@ if your player supports these tags, it can use them to do level adjustment.
|
||||||
|
|
||||||
By default, files that already have ReplayGain tags will not be re-analyzed. If
|
By default, files that already have ReplayGain tags will not be re-analyzed. If
|
||||||
you want to analyze *every* file on import, you can set the ``overwrite`` option
|
you want to analyze *every* file on import, you can set the ``overwrite`` option
|
||||||
for the plugin in your :doc:`/reference/config`, like so::
|
for the plugin in your :doc:`configuration file </reference/config>`, like so::
|
||||||
|
|
||||||
[replaygain]
|
replaygain:
|
||||||
overwrite: yes
|
overwrite: yes
|
||||||
|
|
||||||
The target level can be modified to any target dB with the ``targetlevel``
|
The target level can be modified to any target dB with the ``targetlevel``
|
||||||
option (default: 89 dB).
|
option (default: 89 dB).
|
||||||
|
|
@ -75,7 +75,7 @@ query (see :doc:`/reference/query`) to indicate which items or albums to
|
||||||
analyze.
|
analyze.
|
||||||
|
|
||||||
ReplayGain analysis is not fast, so you may want to disable it during import.
|
ReplayGain analysis is not fast, so you may want to disable it during import.
|
||||||
Use the ``automatic`` config option to control this::
|
Use the ``auto`` config option to control this::
|
||||||
|
|
||||||
[replaygain]
|
replaygain:
|
||||||
automatic: no
|
auto: no
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,15 @@ Specifically, it is intended to let you *canonicalize* names such as artists:
|
||||||
for example, perhaps you want albums from The Jimi Hendrix Experience to be
|
for example, perhaps you want albums from The Jimi Hendrix Experience to be
|
||||||
sorted into the same folder as solo Hendrix albums.
|
sorted into the same folder as solo Hendrix albums.
|
||||||
|
|
||||||
To use field rewriting, first enable the plugin by putting ``rewrite``
|
To use field rewriting, first enable the plugin by putting ``rewrite`` on your
|
||||||
on your ``plugins`` line::
|
``plugins`` line. Then, make a ``rewrite:`` section in your config file to
|
||||||
|
contain your rewrite rules. Each rule consists of a field name, a regular
|
||||||
|
expression pattern, and a replacement value. Rules are written ``fieldname
|
||||||
|
regex: replacement``. For example, this line implements the Jimi Hendrix
|
||||||
|
example above::
|
||||||
|
|
||||||
[beets]
|
rewrite:
|
||||||
plugins: rewrite
|
artist The Jimi Hendrix Experience: Jimi Hendrix
|
||||||
|
|
||||||
Then, make a ``[rewrite]`` section in your config file to contain your rewrite
|
|
||||||
rules. Each rule consists of a field name, a regular expression pattern, and a
|
|
||||||
replacement value. Rules are written ``fieldname regex: replacement``. For
|
|
||||||
example, this line implements the Jimi Hendrix example above::
|
|
||||||
|
|
||||||
[rewrite]
|
|
||||||
artist The Jimi Hendrix Experience: Jimi Hendrix
|
|
||||||
|
|
||||||
This will make ``$artist`` in your path formats expand to "Jimi Henrix" where it
|
This will make ``$artist`` in your path formats expand to "Jimi Henrix" where it
|
||||||
would otherwise be "The Jimi Hendrix Experience".
|
would otherwise be "The Jimi Hendrix Experience".
|
||||||
|
|
@ -27,8 +23,8 @@ The pattern is a case-insensitive regular expression. This means you can use
|
||||||
ordinary regular expression syntax to match multiple artists. For example, you
|
ordinary regular expression syntax to match multiple artists. For example, you
|
||||||
might use::
|
might use::
|
||||||
|
|
||||||
[rewrite]
|
rewrite:
|
||||||
artist .*jimi hendrix.*: Jimi Hendrix
|
artist .*jimi hendrix.*: Jimi Hendrix
|
||||||
|
|
||||||
As a convenience, the plugin applies patterns for the ``artist`` field to the
|
As a convenience, the plugin applies patterns for the ``artist`` field to the
|
||||||
``albumartist`` field as well. (Otherwise, you would probably want to duplicate
|
``albumartist`` field as well. (Otherwise, you would probably want to duplicate
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ Automatic Scrubbing
|
||||||
|
|
||||||
To automatically remove files' tags before writing new ones, just
|
To automatically remove files' tags before writing new ones, just
|
||||||
enable the plugin (see :doc:`/plugins/index`). When importing new files (with
|
enable the plugin (see :doc:`/plugins/index`). When importing new files (with
|
||||||
``import_write`` turned on) or modifying files' tags with the ``beet modify``
|
``import.write`` turned on) or modifying files' tags with the ``beet modify``
|
||||||
command, beets will first strip all types of tags entirely and then write the
|
command, beets will first strip all types of tags entirely and then write the
|
||||||
database-tracked metadata to the file.
|
database-tracked metadata to the file.
|
||||||
|
|
||||||
This behavior can be disabled with the ``autoscrub`` config option (see below).
|
This behavior can be disabled with the ``auto`` config option (see below).
|
||||||
|
|
||||||
Manual Scrubbing
|
Manual Scrubbing
|
||||||
----------------
|
----------------
|
||||||
|
|
@ -35,7 +35,7 @@ Configuring
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The plugin has one configuration option, ``autoscrub``, which lets you disable
|
The plugin has one configuration option, ``autoscrub``, which lets you disable
|
||||||
automatic metadata stripping. To do so, add this to your ``~/.beetsconfig``::
|
automatic metadata stripping. To do so, add this to your ``config.yaml``::
|
||||||
|
|
||||||
[scrub]
|
scrub:
|
||||||
autoscrub: no
|
auto: no
|
||||||
|
|
|
||||||
|
|
@ -11,35 +11,30 @@ regexp patterns can be added by user. How it works::
|
||||||
A Band -> Band, A
|
A Band -> Band, A
|
||||||
An Orchestra -> Orchestra, An
|
An Orchestra -> Orchestra, An
|
||||||
|
|
||||||
To use plugin, enable it by including ``the`` into ``plugins`` line of
|
To use plugin, enable it by including ``the`` into ``plugins`` line of your
|
||||||
your beets config::
|
beets config. The plugin provides a template function called ``%the`` for use
|
||||||
|
in path format expressions::
|
||||||
|
|
||||||
[beets]
|
paths:
|
||||||
plugins = the
|
default: %the{$albumartist}/($year) $album/$track $title
|
||||||
|
|
||||||
Plugin provides template function %the, so you can use it on $albumartist or $artist::
|
The default configuration moves all English articles to the end of the string,
|
||||||
|
but you can override these defaults to make more complex changes::
|
||||||
|
|
||||||
[paths]
|
the:
|
||||||
default: %the{$albumartist}/($year) $album/$track $title
|
# handle The, default is on
|
||||||
|
the=yes
|
||||||
|
# handle A/An, default is on
|
||||||
|
a=yes
|
||||||
|
# format string, {0} - part w/o article, {1} - article
|
||||||
|
# spaces already trimmed from ends of both parts
|
||||||
|
# default is '{0}, {1}'
|
||||||
|
format={0}, {1}
|
||||||
|
# strip instead of moving to the end, default is off
|
||||||
|
strip=no
|
||||||
|
# custom regexp patterns, separated by space
|
||||||
|
patterns=
|
||||||
|
|
||||||
Default options are acceptable (moves all English articles to the end), but you
|
Custom patterns are case-insensitive regular expressions. Patterns can be
|
||||||
can add plugin section into config file::
|
matched anywhere in the string (not just the beginning), so use ``^`` if you
|
||||||
|
intend to match leading words.
|
||||||
[the]
|
|
||||||
# handle The, default is on
|
|
||||||
the=yes
|
|
||||||
# handle A/An, default is on
|
|
||||||
a=yes
|
|
||||||
# format string, {0} - part w/o article, {1} - article
|
|
||||||
# spaces already trimmed from ends of both parts
|
|
||||||
# default is '{0}, {1}'
|
|
||||||
format={0}, {1}
|
|
||||||
# strip instead of moving to the end, default is off
|
|
||||||
strip=no
|
|
||||||
# custom regexp patterns, separated by space
|
|
||||||
patterns=
|
|
||||||
|
|
||||||
Custom patterns are usual regular expressions. Ignore case is turned on, but ^ is not added
|
|
||||||
automatically, so be careful. Actually, you can swap arguments in format option and write
|
|
||||||
regexp to match end of the string, so things will be moved from the end of the string to
|
|
||||||
start.
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ flask``.
|
||||||
|
|
||||||
.. _Flask: http://flask.pocoo.org/
|
.. _Flask: http://flask.pocoo.org/
|
||||||
|
|
||||||
Put ``plugins=web`` in your ``.beetsconfig`` to enable the plugin.
|
Put ``web`` on your ``plugins`` line in your configuration file to enable the
|
||||||
|
plugin.
|
||||||
|
|
||||||
Run the Server
|
Run the Server
|
||||||
--------------
|
--------------
|
||||||
|
|
@ -32,14 +33,14 @@ http://localhost:8337/. This is what it looks like:
|
||||||
|
|
||||||
You can also specify the hostname and port number used by the Web server. These
|
You can also specify the hostname and port number used by the Web server. These
|
||||||
can be specified on the command line or in the ``[web]`` section of your
|
can be specified on the command line or in the ``[web]`` section of your
|
||||||
:doc:`/reference/config`.
|
:doc:`configuration file </reference/config>`.
|
||||||
|
|
||||||
On the command line, use ``beet web [HOSTNAME] [PORT]``. In the config file, use
|
On the command line, use ``beet web [HOSTNAME] [PORT]``. In the config file, use
|
||||||
something like this::
|
something like this::
|
||||||
|
|
||||||
[web]
|
web:
|
||||||
host=127.0.0.1
|
host: 127.0.0.1
|
||||||
port=8888
|
port: 8888
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ plugin can do. (Read on!)
|
||||||
|
|
||||||
To use your new plugin, make sure your ``beetsplug`` directory is in the Python
|
To use your new plugin, make sure your ``beetsplug`` directory is in the Python
|
||||||
path (using ``PYTHONPATH`` or by installing in a `virtualenv`_, for example).
|
path (using ``PYTHONPATH`` or by installing in a `virtualenv`_, for example).
|
||||||
Then, as described above, edit your ``.beetsconfig`` to include
|
Then, as described above, edit your ``config.yaml`` to include
|
||||||
``plugins=myawesomeplugin`` (substituting the name of the Python module
|
``plugins: myawesomeplugin`` (substituting the name of the Python module
|
||||||
containing your plugin).
|
containing your plugin).
|
||||||
|
|
||||||
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
|
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
|
||||||
|
|
@ -75,8 +75,7 @@ your command name.
|
||||||
|
|
||||||
You'll need to add a function to your command by saying ``mycommand.func =
|
You'll need to add a function to your command by saying ``mycommand.func =
|
||||||
myfunction``. This function should take the following parameters: ``lib`` (a
|
myfunction``. This function should take the following parameters: ``lib`` (a
|
||||||
beets ``Library`` object), ``config`` (a `ConfigParser object`_ containing the
|
beets ``Library`` object) and ``opts`` and ``args`` (command-line options and
|
||||||
configuration values), and ``opts`` and ``args`` (command-line options and
|
|
||||||
arguments as returned by `OptionParser.parse_args`_).
|
arguments as returned by `OptionParser.parse_args`_).
|
||||||
|
|
||||||
.. _ConfigParser object: http://docs.python.org/library/configparser.html
|
.. _ConfigParser object: http://docs.python.org/library/configparser.html
|
||||||
|
|
@ -191,17 +190,28 @@ which have somewhat helpful docstrings.
|
||||||
Read Configuration Options
|
Read Configuration Options
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Plugins can configure themselves using the ``.beetsconfig`` file. Define a
|
Plugins can configure themselves using the ``config.yaml`` file. You can read
|
||||||
``configure`` method on your plugin that takes an ``OptionParser`` object as an
|
configuration values in two ways. The first is to use `self.config` within
|
||||||
argument. Then use the ``beets.ui.config_val`` convenience function to access
|
your plugin class. This gives you a view onto the configuration values in a
|
||||||
values from the config file. Like so::
|
section with the same name as your plugin's module. For example, if your plugin
|
||||||
|
is in ``greatplugin.py``, then `self.config` will refer to options under the
|
||||||
|
``greatplugin:`` section of the config file.
|
||||||
|
|
||||||
class MyPlugin(BeetsPlugin):
|
For example, if you have a configuration value called "foo", then users can put
|
||||||
def configure(self, config):
|
this in their ``config.yaml``::
|
||||||
number_of_goats = beets.ui.config_val(config, 'myplug', 'goats', '42')
|
|
||||||
|
|
||||||
Try looking at the ``mpdupdate`` plugin (included with beets) for an example of
|
greatplugin:
|
||||||
real-world use of this API.
|
foo: bar
|
||||||
|
|
||||||
|
To access this value, say ``self.config['foo'].get()`` at any point in your
|
||||||
|
plugin's code. The `self.config` object is a *view* as defined by the `Confit`_
|
||||||
|
library.
|
||||||
|
|
||||||
|
.. _Confit: http://confit.readthedocs.org/
|
||||||
|
|
||||||
|
If you want to access configuration values *outside* of your plugin's section,
|
||||||
|
import the `config` object from the `beets` module. That is, just put ``from
|
||||||
|
beets import config`` at the top of your plugin and access values from there.
|
||||||
|
|
||||||
Add Path Format Functions and Fields
|
Add Path Format Functions and Fields
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,26 @@
|
||||||
Zero Plugin
|
Zero Plugin
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The ``zero`` plugin allows you to null fields before writing tags to files.
|
The ``zero`` plugin allows you to null fields in files' metadata tags. Fields
|
||||||
Fields can be nulled unconditionally or by pattern match. For example, it can
|
can be nulled unconditionally or conditioned on a pattern match. For example,
|
||||||
be used to strip useless comments like "ripped by" etc or any other stuff you
|
the plugin can strip useless comments like "ripped by MyGreatRipper." This
|
||||||
hate. Library is not modified.
|
plugin only affects files' tags; the beets database is unchanged.
|
||||||
|
|
||||||
To use plugin, enable it by including ``zero`` into ``plugins`` line of
|
To use plugin, enable it by including ``zero`` into ``plugins`` line of your
|
||||||
your beets config::
|
configuration file. To configure the plugin, use a ``zero:`` section in your
|
||||||
|
configuration file. Set ``fields`` to the (whitespace-separated) list of fields
|
||||||
[beets]
|
to change. You can get the list of available fields by running ``beet fields``.
|
||||||
plugins = zero
|
To conditionally filter a field, use ``field: [regexp, regexp]`` to specify
|
||||||
|
regular expressions.
|
||||||
To configure the plugin, use a ``[zero]`` section in your configuration file.
|
|
||||||
Set ``fields`` to the (whitespace-separated) list of fields to null. You can get
|
|
||||||
the list of available fields by running ``beet fields``. To conditionally filter
|
|
||||||
a field, use ``field=regexp regexp`` to specify regular expressions.
|
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
[zero]
|
zero:
|
||||||
fields=month day genre comments
|
fields: month day genre comments
|
||||||
# Custom regexp patterns for each field, separated by spaces:
|
comments: [EAC, LAME, from.+collection, 'ripped by']
|
||||||
comments=EAC LAME from.+collection ripped\sby
|
genre: [rnb, 'power metal']
|
||||||
genre=rnb power\smetal
|
|
||||||
|
|
||||||
If custom pattern is not defined, field will be nulled unconditionally. Note
|
If custom pattern is not defined for a given field, the field will be nulled
|
||||||
that the plugin currently does not zero fields when importing "as-is".
|
unconditionally.
|
||||||
|
|
||||||
|
Note that the plugin currently does not zero fields when importing "as-is".
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ Command-Line Interface
|
||||||
Commands
|
Commands
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
.. _import-cmd:
|
||||||
|
|
||||||
import
|
import
|
||||||
``````
|
``````
|
||||||
::
|
::
|
||||||
|
|
@ -81,7 +83,7 @@ right now; this is something we need to work on. Read the
|
||||||
To get this to work correctly, you'll need to use an incremental import *every
|
To get this to work correctly, you'll need to use an incremental import *every
|
||||||
time* you run an import on the directory in question---including the first
|
time* you run an import on the directory in question---including the first
|
||||||
time, when no subdirectories will be skipped. So consider enabling the
|
time, when no subdirectories will be skipped. So consider enabling the
|
||||||
``import_incremental`` configuration option.
|
``incremental`` configuration option.
|
||||||
|
|
||||||
* By default, beets will proceed without asking if it finds a very close
|
* By default, beets will proceed without asking if it finds a very close
|
||||||
metadata match. To disable this and have the importer as you every time,
|
metadata match. To disable this and have the importer as you every time,
|
||||||
|
|
@ -105,10 +107,10 @@ right now; this is something we need to work on. Read the
|
||||||
Just point the ``beet import`` command at a directory of files that are
|
Just point the ``beet import`` command at a directory of files that are
|
||||||
already catalogged in your library. Beets will automatically detect this
|
already catalogged in your library. Beets will automatically detect this
|
||||||
situation and avoid duplicating any items. In this situation, the "copy
|
situation and avoid duplicating any items. In this situation, the "copy
|
||||||
files" option (``-c``/``-C`` on the command line or ``import_copy`` in the
|
files" option (``-c``/``-C`` on the command line or ``copy`` in the
|
||||||
config file) has slightly different behavior: it causes files to be *moved*,
|
config file) has slightly different behavior: it causes files to be *moved*,
|
||||||
rather than duplicated, if they're already in your library. (The same is
|
rather than duplicated, if they're already in your library. (The same is
|
||||||
true, of course, if ``import_move`` is enabled.) That is, your directory
|
true, of course, if ``move`` is enabled.) That is, your directory
|
||||||
structure will be updated to reflect the new tags if copying is enabled; you
|
structure will be updated to reflect the new tags if copying is enabled; you
|
||||||
never end up with two copies of the file.
|
never end up with two copies of the file.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,100 +1,62 @@
|
||||||
.beetsconfig
|
Configuration
|
||||||
============
|
=============
|
||||||
|
|
||||||
The ``beet`` command reads configuration information from ``~/.beetsconfig`` on
|
Beets has an extensive configuration system that lets you customize nearly
|
||||||
Unix-like OSes (inluding Mac OS X) and ``%APPDATA%\beetsconfig.ini`` on Windows.
|
every aspect of its operation. To configure beets, you'll edit a file called
|
||||||
The file is in INI format.
|
``config.yaml``. The location of this file depends on your OS:
|
||||||
|
|
||||||
Options
|
* On Unix-like OSes (including OS X), you want ``~/.config/beets/config.yaml``.
|
||||||
-------
|
* On Windows, use ``%APPDATA%\beets\config.yaml``. This is usually in a
|
||||||
|
directory like ``C:\Users\You\AppData\Roaming``.
|
||||||
|
* On OS X, you can also use ``~/Library/Application Support/beets/config.yaml``
|
||||||
|
if you prefer that over the Unix-like ``~/.config``.
|
||||||
|
* If you prefer a different location, set the ``BEETSDIR`` environment variable
|
||||||
|
to a path; beets will then look for a ``config.yaml`` in that directory.
|
||||||
|
|
||||||
These options are available, all of which must appear under the ``[beets]``
|
The config file uses `YAML`_ syntax. You can use the full power of YAML, but
|
||||||
section header:
|
most configuration options are simple key/value pairs. This means your config
|
||||||
|
file will look like this::
|
||||||
|
|
||||||
|
option: value
|
||||||
|
another_option: foo
|
||||||
|
bigger_option:
|
||||||
|
key: value
|
||||||
|
foo: bar
|
||||||
|
|
||||||
|
If you have questions about more sophisticated syntax, take a look at the
|
||||||
|
`YAML`_ documentation.
|
||||||
|
|
||||||
|
.. _YAML: http://yaml.org/
|
||||||
|
|
||||||
|
Global Options
|
||||||
|
--------------
|
||||||
|
|
||||||
|
These options control beets' global operation.
|
||||||
|
|
||||||
library
|
library
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
Path to the beets library file. Defaults to ``~/.beetsmusic.blb`` on Unix
|
Path to the beets library file. By default, beets will use a file called
|
||||||
and ``%APPDATA\beetsmusic.blb`` on Windows.
|
``beetsmusic.blb`` alongside your configuration file.
|
||||||
|
|
||||||
directory
|
directory
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
The directory to which files will be copied/moved when adding them to the
|
The directory to which files will be copied/moved when adding them to the
|
||||||
library. Defaults to ``~/Music``.
|
library. Defaults to a folder called ``Music`` in your home directory.
|
||||||
|
|
||||||
import_write
|
plugins
|
||||||
~~~~~~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
Either ``yes`` or ``no``, controlling whether metadata (e.g., ID3) tags are
|
A space-separated list of plugin module names to load. For instance, beets
|
||||||
written to files when using ``beet import``. Defaults to ``yes``. The ``-w``
|
includes the BPD plugin for playing music.
|
||||||
and ``-W`` command-line options override this setting.
|
|
||||||
|
|
||||||
import_copy
|
pluginpath
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``yes`` or ``no``, indicating whether to **copy** files into the
|
|
||||||
library directory when using ``beet import``. Defaults to ``yes``. Can be
|
|
||||||
overridden with the ``-c`` and ``-C`` command-line options.
|
|
||||||
|
|
||||||
The option is ignored if ``import_move`` is enabled (i.e., beets can move or
|
|
||||||
copy files but it doesn't make sense to do both).
|
|
||||||
|
|
||||||
import_move
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``yes`` or ``no``, indicating whether to **move** files into the
|
|
||||||
library directory when using ``beet import``.
|
|
||||||
Defaults to ``no``.
|
|
||||||
|
|
||||||
The effect is similar to the ``import_copy`` option but you end up with only
|
|
||||||
one copy of the imported file. ("Moving" works even across filesystems; if
|
|
||||||
necessary, beets will copy and then delete when a simple rename is
|
|
||||||
impossible.) Moving files can be risky—it's a good idea to keep a backup in
|
|
||||||
case beets doesn't do what you expect with your files.
|
|
||||||
|
|
||||||
This option *overrides* ``import_copy``, so enabling it will always move
|
|
||||||
(and not copy) files. The ``-c`` switch to the ``beet import`` command,
|
|
||||||
however, still takes precedence.
|
|
||||||
|
|
||||||
import_resume
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``yes``, ``no``, or ``ask``. Controls whether interrupted imports
|
|
||||||
should be resumed. "Yes" means that imports are always resumed when
|
|
||||||
possible; "no" means resuming is disabled entirely; "ask" (the default)
|
|
||||||
means that the user should be prompted when resuming is possible. The ``-p``
|
|
||||||
and ``-P`` flags correspond to the "yes" and "no" settings and override this
|
|
||||||
option.
|
|
||||||
|
|
||||||
import_incremental
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``yes`` or ``no``, controlling whether imported directories are
|
|
||||||
recorded and whether these recorded directories are skipped. This
|
|
||||||
corresponds to the ``-i`` flag to ``beet import``.
|
|
||||||
|
|
||||||
import_quiet_fallback
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``skip`` (default) or ``asis``, specifying what should happen in
|
|
||||||
quiet mode (see the ``-q`` flag to ``import``, above) when there is no
|
|
||||||
strong recommendation.
|
|
||||||
|
|
||||||
import_timid
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Either ``yes`` or ``no``, controlling whether the importer runs in *timid*
|
|
||||||
mode, in which it asks for confirmation on every autotagging match, even the
|
|
||||||
ones that seem very close. Defaults to ``no``. The ``-t`` command-line flag
|
|
||||||
controls the same setting.
|
|
||||||
|
|
||||||
import_log
|
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
Specifies a filename where the importer's log should be kept. By default,
|
A colon-separated list of directories to search for plugins. These paths
|
||||||
no log is written. This can be overridden with the ``-l`` flag to
|
are just added to ``sys.path`` before the plugins are loaded. The plugins
|
||||||
``import``.
|
still have to be contained in a ``beetsplug`` namespace package.
|
||||||
|
|
||||||
ignore
|
ignore
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
@ -110,25 +72,24 @@ replace
|
||||||
|
|
||||||
A set of regular expression/replacement pairs to be applied to all filenames
|
A set of regular expression/replacement pairs to be applied to all filenames
|
||||||
created by beets. Typically, these replacements are used to avoid confusing
|
created by beets. Typically, these replacements are used to avoid confusing
|
||||||
problems or errors with the filesystem (for example, leading ``.``
|
problems or errors with the filesystem (for example, leading dots, which hide
|
||||||
characters are replaced on Unix and trailing whitespace is removed on
|
files on Unix, and trailing whitespace, which is illegal on Windows). To
|
||||||
Windows). To override these substitutions, specify a sequence of
|
override these substitutions, specify a mapping from regular expression to
|
||||||
whitespace-separated terms; the first term is a regular expression and the
|
replacement strings. For example, ``[xy]: z`` will make beets replace all
|
||||||
second is a string that should replace anything matching that regex. For
|
instances of the characters ``x`` or ``y`` with the character ``z``.
|
||||||
example, ``replace = [xy] z`` will make beets replace all instances of the
|
|
||||||
characters ``x`` or ``y`` with the character ``z``.
|
|
||||||
|
|
||||||
If you do change this value, be certain that you include at least enough
|
If you do change this value, be certain that you include at least enough
|
||||||
substitutions to avoid causing errors on your operating system. Here are
|
substitutions to avoid causing errors on your operating system. Here are
|
||||||
the default substitutions used by beets, which are sufficient to avoid
|
the default substitutions used by beets, which are sufficient to avoid
|
||||||
unexpected behavior on all popular platforms::
|
unexpected behavior on all popular platforms::
|
||||||
|
|
||||||
replace = [\\/] _
|
replace:
|
||||||
^\. _
|
'[\\/]': _
|
||||||
[\x00-\x1f] _
|
'^\.': _
|
||||||
[<>:"\?\*\|] _
|
'[\x00-\x1f]': _
|
||||||
\.$ _
|
'[<>:"\?\*\|]': _
|
||||||
\s+$ <strip>
|
'\.$': _
|
||||||
|
'\s+$': ''
|
||||||
|
|
||||||
These substitutions remove forward and back slashes, leading dots, and
|
These substitutions remove forward and back slashes, leading dots, and
|
||||||
control characters—all of which is a good idea on any OS. The fourth line
|
control characters—all of which is a good idea on any OS. The fourth line
|
||||||
|
|
@ -137,20 +98,6 @@ compatibility with Windows-influenced network filesystems like Samba).
|
||||||
Trailing dots and trailing whitespace, which can cause problems on Windows
|
Trailing dots and trailing whitespace, which can cause problems on Windows
|
||||||
clients, are also removed.
|
clients, are also removed.
|
||||||
|
|
||||||
To replace space characters, use the ``\s`` (whitespace) entity::
|
|
||||||
|
|
||||||
replace = \s _
|
|
||||||
...
|
|
||||||
|
|
||||||
This will avoid using a literal space and thus confusing beets. (``\s`` also
|
|
||||||
matches tabs and newlines, but that is probably fine.)
|
|
||||||
|
|
||||||
To remove characters entirely, use ``<strip>`` as the replacement. For
|
|
||||||
example, to remove all vowels from your filenames::
|
|
||||||
|
|
||||||
replace = [aeiou] <strip>
|
|
||||||
...
|
|
||||||
|
|
||||||
.. _art-filename:
|
.. _art-filename:
|
||||||
|
|
||||||
art_filename
|
art_filename
|
||||||
|
|
@ -162,19 +109,6 @@ of the syntax available to :doc:`/reference/pathformat`. Defaults to ``cover``
|
||||||
(i.e., images will be named ``cover.jpg`` or ``cover.png`` and placed in the
|
(i.e., images will be named ``cover.jpg`` or ``cover.png`` and placed in the
|
||||||
album's directory).
|
album's directory).
|
||||||
|
|
||||||
plugins
|
|
||||||
~~~~~~~
|
|
||||||
|
|
||||||
A space-separated list of plugin module names to load. For instance, beets
|
|
||||||
includes the BPD plugin for playing music.
|
|
||||||
|
|
||||||
pluginpath
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
A colon-separated list of directories to search for plugins. These paths
|
|
||||||
are just added to ``sys.path`` before the plugins are loaded. The plugins
|
|
||||||
still have to be contained in a ``beetsplug`` namespace package.
|
|
||||||
|
|
||||||
threaded
|
threaded
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
|
|
@ -231,38 +165,113 @@ If you enable ``per_disc_numbering``, you will likely want to change your
|
||||||
filenames sort correctly in album directories. For example, you might want to
|
filenames sort correctly in album directories. For example, you might want to
|
||||||
use a path format like this::
|
use a path format like this::
|
||||||
|
|
||||||
[paths]
|
paths:
|
||||||
default: $albumartist/$album%aunique{}/$disc-$track $title
|
default: $albumartist/$album%aunique{}/$disc-$track $title
|
||||||
|
|
||||||
import_delete
|
Importer Options
|
||||||
~~~~~~~~~~~~~
|
----------------
|
||||||
|
|
||||||
Either ``yes`` or ``no``. When enabled in conjunction with ``import_copy``,
|
The options that control the :ref:`import-cmd` command are indented under the
|
||||||
deletes original files after they are copied into your library. Has no
|
``import:`` key. For example, you might have a section in your configuration
|
||||||
effect if the importer is in ``import_move`` mode or "leave files in place"
|
file that looks like this::
|
||||||
mode. Defaults to ``no``.
|
|
||||||
|
|
||||||
This option is historical and deprecated: it's almost always more
|
import:
|
||||||
appropriate to use ``import_move`` instead.
|
write: yes
|
||||||
|
copy: yes
|
||||||
|
resume: no
|
||||||
|
|
||||||
|
These options are available in this section:
|
||||||
|
|
||||||
|
write
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
Either ``yes`` or ``no``, controlling whether metadata (e.g., ID3) tags are
|
||||||
|
written to files when using ``beet import``. Defaults to ``yes``. The ``-w``
|
||||||
|
and ``-W`` command-line options override this setting.
|
||||||
|
|
||||||
|
copy
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Either ``yes`` or ``no``, indicating whether to **copy** files into the
|
||||||
|
library directory when using ``beet import``. Defaults to ``yes``. Can be
|
||||||
|
overridden with the ``-c`` and ``-C`` command-line options.
|
||||||
|
|
||||||
|
The option is ignored if ``move`` is enabled (i.e., beets can move or
|
||||||
|
copy files but it doesn't make sense to do both).
|
||||||
|
|
||||||
|
move
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Either ``yes`` or ``no``, indicating whether to **move** files into the
|
||||||
|
library directory when using ``beet import``.
|
||||||
|
Defaults to ``no``.
|
||||||
|
|
||||||
|
The effect is similar to the ``copy`` option but you end up with only
|
||||||
|
one copy of the imported file. ("Moving" works even across filesystems; if
|
||||||
|
necessary, beets will copy and then delete when a simple rename is
|
||||||
|
impossible.) Moving files can be risky—it's a good idea to keep a backup in
|
||||||
|
case beets doesn't do what you expect with your files.
|
||||||
|
|
||||||
|
This option *overrides* ``copy``, so enabling it will always move
|
||||||
|
(and not copy) files. The ``-c`` switch to the ``beet import`` command,
|
||||||
|
however, still takes precedence.
|
||||||
|
|
||||||
|
resume
|
||||||
|
~~~~~~
|
||||||
|
|
||||||
|
Either ``yes``, ``no``, or ``ask``. Controls whether interrupted imports
|
||||||
|
should be resumed. "Yes" means that imports are always resumed when
|
||||||
|
possible; "no" means resuming is disabled entirely; "ask" (the default)
|
||||||
|
means that the user should be prompted when resuming is possible. The ``-p``
|
||||||
|
and ``-P`` flags correspond to the "yes" and "no" settings and override this
|
||||||
|
option.
|
||||||
|
|
||||||
|
incremental
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
Either ``yes`` or ``no``, controlling whether imported directories are
|
||||||
|
recorded and whether these recorded directories are skipped. This
|
||||||
|
corresponds to the ``-i`` flag to ``beet import``.
|
||||||
|
|
||||||
|
quiet_fallback
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Either ``skip`` (default) or ``asis``, specifying what should happen in
|
||||||
|
quiet mode (see the ``-q`` flag to ``import``, above) when there is no
|
||||||
|
strong recommendation.
|
||||||
|
|
||||||
|
timid
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
Either ``yes`` or ``no``, controlling whether the importer runs in *timid*
|
||||||
|
mode, in which it asks for confirmation on every autotagging match, even the
|
||||||
|
ones that seem very close. Defaults to ``no``. The ``-t`` command-line flag
|
||||||
|
controls the same setting.
|
||||||
|
|
||||||
|
log
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Specifies a filename where the importer's log should be kept. By default,
|
||||||
|
no log is written. This can be overridden with the ``-l`` flag to
|
||||||
|
``import``.
|
||||||
|
|
||||||
.. _path-format-config:
|
.. _path-format-config:
|
||||||
|
|
||||||
Path Format Configuration
|
Path Format Configuration
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
You can also configure the directory hierarchy beets uses to store music. These
|
You can also configure the directory hierarchy beets uses to store music.
|
||||||
settings appear under the ``[paths]`` section (rather than the main ``[beets]``
|
These settings appear under the ``paths:`` key. Each string is a template
|
||||||
section we used above). Each string is a template string that can refer to
|
string that can refer to metadata fields like ``$artist`` or ``$title``. The
|
||||||
metadata fields like ``$artist`` or ``$title``. The filename extension is added
|
filename extension is added automatically. At the moment, you can specify three
|
||||||
automatically. At the moment, you can specify three special paths: ``default``
|
special paths: ``default`` for most releases, ``comp`` for "various artist"
|
||||||
for most releases, ``comp`` for "various artist" releases with no dominant
|
releases with no dominant artist, and ``singleton`` for non-album tracks. The
|
||||||
artist, and ``singleton`` for non-album tracks. The defaults look like this::
|
defaults look like this::
|
||||||
|
|
||||||
[paths]
|
paths:
|
||||||
default: $albumartist/$album%aunique{}/$track $title
|
default: $albumartist/$album%aunique{}/$track $title
|
||||||
singleton: Non-Album/$artist/$title
|
singleton: Non-Album/$artist/$title
|
||||||
comp: Compilations/$album%aunique{}/$track $title
|
comp: Compilations/$album%aunique{}/$track $title
|
||||||
|
|
||||||
Note the use of ``$albumartist`` instead of ``$artist``; this ensure that albums
|
Note the use of ``$albumartist`` instead of ``$artist``; this ensure that albums
|
||||||
will be well-organized. For more about these format strings, see
|
will be well-organized. For more about these format strings, see
|
||||||
|
|
@ -270,21 +279,19 @@ will be well-organized. For more about these format strings, see
|
||||||
albums are placed in different directories; see :ref:`aunique` for details.
|
albums are placed in different directories; see :ref:`aunique` for details.
|
||||||
|
|
||||||
In addition to ``default``, ``comp``, and ``singleton``, you can condition path
|
In addition to ``default``, ``comp``, and ``singleton``, you can condition path
|
||||||
queries based on beets queries (see :doc:`/reference/query`). There's one catch:
|
queries based on beets queries (see :doc:`/reference/query`). This means that a
|
||||||
because the ``:`` character is reserved for separating the query from the
|
config file like this::
|
||||||
template string, the ``_`` character is substituted for ``:`` in these queries.
|
|
||||||
This means that a config file like this::
|
|
||||||
|
|
||||||
[paths]
|
paths:
|
||||||
albumtype_soundtrack: Soundtracks/$album/$track $title
|
albumtype:soundtrack: Soundtracks/$album/$track $title
|
||||||
|
|
||||||
will place soundtrack albums in a separate directory. The queries are tested in
|
will place soundtrack albums in a separate directory. The queries are tested in
|
||||||
the order they appear in the configuration file, meaning that if an item matches
|
the order they appear in the configuration file, meaning that if an item matches
|
||||||
multiple queries, beets will use the path format for the *first* matching query.
|
multiple queries, beets will use the path format for the *first* matching query.
|
||||||
|
|
||||||
Note that the special ``singleton`` and ``comp`` path format conditions are, in
|
Note that the special ``singleton`` and ``comp`` path format conditions are, in
|
||||||
fact, just shorthand for the explicit queries ``singleton_true`` and
|
fact, just shorthand for the explicit queries ``singleton:true`` and
|
||||||
``comp_true``. In contrast, ``default`` is special and has no query equivalent:
|
``comp:true``. In contrast, ``default`` is special and has no query equivalent:
|
||||||
the ``default`` format is only used if no queries match.
|
the ``default`` format is only used if no queries match.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
|
@ -292,17 +299,17 @@ Example
|
||||||
|
|
||||||
Here's an example file::
|
Here's an example file::
|
||||||
|
|
||||||
[beets]
|
|
||||||
library: /var/music.blb
|
library: /var/music.blb
|
||||||
directory: /var/mp3
|
directory: /var/mp3
|
||||||
path_format: $genre/$artist/$album/$track $title
|
path_format: $genre/$artist/$album/$track $title
|
||||||
import_copy: yes
|
import:
|
||||||
import_write: yes
|
copy: yes
|
||||||
import_resume: ask
|
write: yes
|
||||||
import_art: yes
|
resume: ask
|
||||||
import_quiet_fallback: skip
|
art: yes
|
||||||
import_timid: no
|
quiet_fallback: skip
|
||||||
import_log: beetslog.txt
|
timid: no
|
||||||
|
log: beetslog.txt
|
||||||
ignore: .AppleDouble ._* *~ .DS_Store
|
ignore: .AppleDouble ._* *~ .DS_Store
|
||||||
art_filename: albumart
|
art_filename: albumart
|
||||||
plugins: bpd
|
plugins: bpd
|
||||||
|
|
@ -310,27 +317,20 @@ Here's an example file::
|
||||||
threaded: yes
|
threaded: yes
|
||||||
color: yes
|
color: yes
|
||||||
|
|
||||||
[paths]
|
paths:
|
||||||
default: $genre/$albumartist/$album/$track $title
|
default: $genre/$albumartist/$album/$track $title
|
||||||
singleton: Singletons/$artist - $title
|
singleton: Singletons/$artist - $title
|
||||||
comp: $genre/$album/$track $title
|
comp: $genre/$album/$track $title
|
||||||
albumtype_soundtrack: Soundtracks/$album/$track $title
|
albumtype:soundtrack: Soundtracks/$album/$track $title
|
||||||
|
|
||||||
[bpd]
|
bpd:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6600
|
port: 6600
|
||||||
password: seekrit
|
password: seekrit
|
||||||
|
|
||||||
(That ``[bpd]`` section configures the optional :doc:`BPD </plugins/bpd>`
|
(That ``[bpd]`` section configures the optional :doc:`BPD </plugins/bpd>`
|
||||||
plugin.)
|
plugin.)
|
||||||
|
|
||||||
Location
|
|
||||||
--------
|
|
||||||
|
|
||||||
The configuration file is typically located at ``$HOME/.beetsconfig``. If you
|
|
||||||
want to store your ``.beetsconfig`` file somewhere else for whatever reason, you
|
|
||||||
can specify its path by setting the ``BEETSCONFIG`` environment variable.
|
|
||||||
|
|
||||||
.. only:: man
|
.. only:: man
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue