Further document formatted modify with examples

I think these can make it clearer why someone would want to use this
feature. (Part of #4095.)
This commit is contained in:
Adrian Sampson 2022-08-20 16:47:01 -07:00
parent dad918e63c
commit b207224d57
No known key found for this signature in database
GPG key ID: BDB93AB409CC8705
2 changed files with 7 additions and 1 deletions

View file

@ -137,6 +137,8 @@ Major new features:
Thanks to :user:`edgars-supe`.
* The :ref:`modify-cmd` and :ref:`import-cmd` can now use
:doc:`/reference/pathformat` formats when setting fields.
For example, you can now do ``beet modify title='$track $title'`` to put
track numbers into songs' titles.
:bug:`488`
Other new things:

View file

@ -267,8 +267,12 @@ artist="Tom Tom Club"`` will change the artist for the track "Genius of Love."
To remove fields (which is only possible for flexible attributes), follow a
field name with an exclamation point: ``field!``.
Values support the same template syntax as beets'
Values can also be *templates*, using the same syntax as
:doc:`path formats <pathformat>`.
For example, ``beet modify artist='$artist_sort'`` will copy the artist sort
name into the artist field for all your tracks,
and ``beet modify title='$track $title'`` will add track numbers to their
title metadata.
The ``-a`` switch also operates on albums in addition to the individual tracks.
Without this flag, the command will only change *track-level* data, even if all