From b207224d57964d18ef61dfbb39438654f2a591be Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 20 Aug 2022 16:47:01 -0700 Subject: [PATCH] Further document formatted modify with examples I think these can make it clearer why someone would want to use this feature. (Part of #4095.) --- docs/changelog.rst | 2 ++ docs/reference/cli.rst | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index fe42dfad5..1b4669fae 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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: diff --git a/docs/reference/cli.rst b/docs/reference/cli.rst index 1d5a42731..da119d0f8 100644 --- a/docs/reference/cli.rst +++ b/docs/reference/cli.rst @@ -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 `. +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