From d8008e145f4376e1464806593f835da387b30d45 Mon Sep 17 00:00:00 2001 From: Fabrice Laporte Date: Thu, 8 May 2014 22:05:26 +0200 Subject: [PATCH 1/3] Add section listing template functions/fields provided by plugins for path formatting --- docs/reference/pathformat.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/reference/pathformat.rst b/docs/reference/pathformat.rst index 0108bcc56..45a254e82 100644 --- a/docs/reference/pathformat.rst +++ b/docs/reference/pathformat.rst @@ -227,3 +227,14 @@ Library metadata: * mtime: The modification time of the audio file. * added: The date and time that the music was added to your library. + +Template functions and values provided by plugins +------------------------------------------------- + +Remember to activate corresponding plugin before using one of those additional +fields/functions : + +* missing by :doc:`/plugins/missing`: number of missing tracks per album +* ``%the{text}`` by :doc:`/plugins/fetchart`: moves english articles to end of +strings + From c5babea31f17a45c97ccb0239d139fedf1e7d020 Mon Sep 17 00:00:00 2001 From: "Fabrice L." Date: Thu, 8 May 2014 22:27:21 +0200 Subject: [PATCH 2/3] fix typo from copy/paste --- docs/reference/pathformat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/pathformat.rst b/docs/reference/pathformat.rst index 45a254e82..42302a0a3 100644 --- a/docs/reference/pathformat.rst +++ b/docs/reference/pathformat.rst @@ -235,6 +235,6 @@ Remember to activate corresponding plugin before using one of those additional fields/functions : * missing by :doc:`/plugins/missing`: number of missing tracks per album -* ``%the{text}`` by :doc:`/plugins/fetchart`: moves english articles to end of +* ``%the{text}`` by :doc:`/plugins/the`: moves english articles to end of strings From c002e4599c686665035c5a7fc75738565588baa5 Mon Sep 17 00:00:00 2001 From: Fabrice Laporte Date: Fri, 9 May 2014 08:59:22 +0200 Subject: [PATCH 3/3] Add text to new _templ_plugins section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace links to ‘writing-plugin’ by internal links to ‘templ_plugins’. Add small paragraph at the end of _templ_plugins to mention ‘inline’ plugin and the ‘Writing Plugins’ page. --- docs/reference/pathformat.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/reference/pathformat.rst b/docs/reference/pathformat.rst index 45a254e82..61b6361df 100644 --- a/docs/reference/pathformat.rst +++ b/docs/reference/pathformat.rst @@ -80,7 +80,7 @@ These functions are built in to beets: .. _strftime: http://docs.python.org/2/library/time.html#time.strftime Plugins can extend beets with more template functions (see -:ref:`writing-plugins`). +:ref:`templ_plugins`). .. _aunique: @@ -158,7 +158,7 @@ Available Values Here's a list of the different values available to path formats. The current list can be found definitively by running the command ``beet fields``. Note that plugins can add new (or replace existing) template values (see -:ref:`writing-plugins`). +:ref:`templ_plugins`). Ordinary metadata: @@ -228,6 +228,8 @@ Library metadata: * mtime: The modification time of the audio file. * added: The date and time that the music was added to your library. +.. _templ_plugins: + Template functions and values provided by plugins ------------------------------------------------- @@ -236,5 +238,11 @@ fields/functions : * missing by :doc:`/plugins/missing`: number of missing tracks per album * ``%the{text}`` by :doc:`/plugins/fetchart`: moves english articles to end of -strings + strings +In case you would need a field not mentioned hereabove, +:doc:`/plugins/inline` lets you define template fields in your beets +configuration file using python snippets. +And for more advanced processing, you can go all-in and write a dedicated +plugin to register your own fields/functions (see +:ref:`writing-plugins`).