Debian Codegraph @

docs/plugins/edit.rst

raw
1 Edit Plugin
2 ===========
3
4 The ``edit`` plugin lets you modify music metadata using your favorite text
5 editor.
6
7 Enable the ``edit`` plugin in your configuration (see :ref:`using-plugins`) and
8 then type:
9
10 ::
11
12 beet edit QUERY
13
14 Your text editor (i.e., the command in your ``$VISUAL`` or ``$EDITOR``
15 environment variable) will open with a list of tracks to edit. Make your changes
16 and exit your text editor to apply them to your music.
17
18 Command-Line Options
19 --------------------
20
21 The ``edit`` command has these command-line options:
22
23 - ``-a`` or ``--album``: Edit albums instead of individual items.
24 - ``-f FIELD`` or ``--field FIELD``: Specify an additional field to edit (in
25 addition to the defaults set in the configuration).
26 - ``--all``: Edit *all* available fields.
27
28 Interactive Usage
29 -----------------
30
31 The ``edit`` plugin can also be invoked during an import session. If enabled, it
32 adds two new options to the user prompt:
33
34 ::
35
36 [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums, Enter search, enter Id, aBort, eDit, edit Candidates?
37
38 - ``eDit``: use this option for using the original items' metadata as the
39 starting point for your edits.
40 - ``edit Candidates``: use this option for using a candidate's metadata as the
41 starting point for your edits.
42
43 When editing an album during import (i.e., after you have chosen ``eDit`` or
44 ``edit Candidates`` for an album import), the fields listed in ``albumfields``
45 are shown as a YAML header section before the per-track documents. This allows
46 you to edit album-level fields (such as ``album``, ``albumartist``, or any
47 configured ``albumfields`` entry) for all tracks at once. Fields accepted into
48 the album header are omitted from the per-track documents. Fields unsuitable for
49 the header remain per-track when also configured in ``itemfields``.
50
51 Also, please be aware that the ``edit Candidates`` choice can only be used with
52 the matches found during the initial search (and currently not supporting the
53 candidates found via the ``Enter search`` or ``enter Id`` choices). You might
54 find the ``--search-id SEARCH_ID`` :ref:`import-cmd` option useful for those
55 cases where you already have a specific candidate ID that you want to edit.
56
57 Configuration
58 -------------
59
60 To configure the plugin, make an ``edit:`` section in your configuration file.
61 The available options are:
62
63 - **itemfields**: A space-separated list of item fields to include in the editor
64 by default. Default: ``track title artist album``
65 - **albumfields**: The same when editing albums (with the ``-a`` option).
66 Default: ``album albumartist``. These fields are also shown as a YAML header
67 during interactive import when editing an album import.